i have use this theme Theme.MaterialComponents.Light.NoActionBar for the activity but it works fine in android emulator with android version R and API level 30.But when i installed APK inside samsung A51 model with customize os One UI 3.0 with Android R its look is change Please help me with this
I have been using theme code inside theme.xml file
<style name="Theme.MediLogix" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">#79BC2E</item>
<item name="colorPrimaryVariant">#79BC2E</item>
<item name="colorPrimaryDark">#79BC2E</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
</style>
its working fine inside android emulator with Android 11
but in samsung A51 with android 11 customize os One UI 3.0. it look like this
I have passed by similar problem, it looks like that because you are activating dark mode on mobile phone, to solve it:
you have to change the theme to android:theme="@style/Theme.MaterialComponents.NoActionBar"
you have to change the color of states bar (that looks purple at Samsung device) to green, so it it appears green at light and dark themes
change the color of the icons at the bottom to black as default and it appears green when selected.
To do that you have to get to res files and add a new package. inside it add a new xml file then add this code(you can custom the numbers):
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#79BC2E"
android:state_checked="true"/>
<item android:color="#4C4C4C"
android:state_checked="false"/>
at the activity, at the navigationbar view, add this attribute
app:itemIconTint="@color/-the name of the xml you have created-"
change the color of "Home" title to white