Create Activity Styles

This section outlines how to display custom views in your app. They are implemented using activity styles.

To create activity styles

  1. From Android Studio, open your project.
  2. Navigate to the app folder, then from src > res > values folder, locate your styles.xml file. styles.xml
  3. At the end of the Resources tag, add these lines of code:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <style name="PickerAnim" parent="@android:style/Theme.Dialog">
        <item name="android:layout_width">fill_parent</item>
        <item name="android:layout_height">match_parent</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">false</item>
    </style>
    <style name="Transparent" parent="android:Theme">
        <item name="android:layout_height">match_parent</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:backgroundDimEnabled">true</item>
    </style>
    </resources>
    

results matching ""

    No results matching ""