after months of developing on the Android platform, I still have an unanswered question. I noticed a long time ago that I have ONE single Activity that doesn't conform to the rest of the app theme. This means that by default, the font color of the Activity is white (not black), and Checkboxes don't show up when not checked, you can't see them at all. Very peculiar behavior. Recently, I changed the colorAccent attribute of my theme, which changed ALL accent colors to orange (including Checkboxes), but this Activity remains unchanged. Has anybody ever experienced this?
I made this Activity into a fragment once, and it then magically conformed to the theme. After switching back to the Activity, even making a brand new Activity to host the logic, nothing has changed. Here's the Activity layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
xmlns:app="http://ift.tt/GEGVYd"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
>
<android.support.design.widget.AppBarLayout android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay"
app:layout_scrollFlags="scroll|enterAlways">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<me.core.utility.TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="24sp"
android:id="@+id/title_bar"
android:textColor="@android:color/white"
android:text="Edit"
/>
</RelativeLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/appbar"
android:id="@+id/listview"
android:scrollbars="none"
android:layout_above="@+id/buttons_layout"
android:layout_gravity="center_horizontal|top"
/>
<LinearLayout
android:weightSum="2"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:background="@android:color/transparent"
android:id="@+id/buttons_layout"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CANCEL"
android:layout_weight="1"
android:layout_margin="@dimen/activity_vertical_margin"
android:id="@+id/cancel_editing_button"
android:background="@drawable/custom_button_logout"
android:textColor="@android:color/white"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DONE"
android:layout_weight="1"
android:layout_margin="@dimen/activity_vertical_margin"
android:id="@+id/done_editing_button"
android:background="@drawable/custom_button_logout"
android:textColor="@android:color/white"
/>
</LinearLayout>
</RelativeLayout>
And here's an image of what this all looks like:
Does anybody have any ideas while this Activity has gone rogue??
Aucun commentaire:
Enregistrer un commentaire