Change shadow color of Viewpager

Asked

Viewed 27 times

0

How do I make this shadow of viewpager change color?

inserir a descrição da imagem aqui

  • You are referring to that white bar underneath the text "CALLS"?

1 answer

1


This color is usually the same as Accent, look in the res folder, in the Styles file, if not, add these lines:

 <style name="AppTheme" parent="android:Theme.Material">
    <!-- Main theme colors -->

    <item name="android:colorPrimary">@color/primary</item>

    <item name="android:colorPrimaryDark">@color/primary_dark</item>

    <item name="android:colorAccent">@color/accent</item>
  </style>

"colorAccent" are these secondary colors of selection, where it is @color/accent you can change to the color you want ex black : #000

After that just put this theme in your Activity in the manifest:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

The other two style colors are the color of your toolbar and the color of the upper part, where it shows battery, cell phone time etc, you also the arrow of your preference in the theme.

Site with various colors: link

  • Thank you very much! :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.