2,205 questions
0
votes
0
answers
25
views
Migrate Collapsing Toolbar from MaterialComponents to Material3
I a collapsing toolbar layout that I want to migrate to Material3 themes. I have reproduced the issue with a sample app I have built based on https://github.com/chrisbanes/cheesesquare. It looks like ...
2
votes
1
answer
47
views
Why styles do not work properly with Material3 (Android)?
I am using the below code to add a style to RadioButtons in my app. The parent of the base theme of the app is Theme.Material3.DayNight.NoActionBar.
Below is the code:
<style name="RadioStyle&...
1
vote
1
answer
76
views
How to Implement Real-Time Theme Switching in Android with Kotlin?
I'm working on an Android app in Kotlin and want to allow users to toggle between light and dark themes in real-time, without restarting the app. I've tried using the AppCompatDelegate....
0
votes
0
answers
27
views
Unable to change Overflow icon color in my Toolbar
In my gradle I'm using material 1.12 acording to various article it is somehow possible to style the threedots icon used as overflow menu for my toolbar (top) this is what I have defined in my style, ...
0
votes
0
answers
12
views
Clean way to implement an onClickListener in android apps
In my games/apps I find I want button presses to make clicking or pressing sounds when the user interacts with them. My current working solution is quite ugly and I was wondering if there's a more ...
0
votes
1
answer
98
views
How to change alert style in .Net MAUI Android?
I am porting an application from Xamarin to .Net MAUI, In Xamarin I was using a light theme in Android, so the alerts had a white background but in MAUI the alerts have a gray background.
How can I ...
0
votes
1
answer
66
views
App is ignoring windowSplashScreenBackground after working on themes
I had a very simple splash using API the background was correctly set. I then started working on themes and fixing bugs, and when I was done, the app icon still show a rounded square with correct ...
0
votes
1
answer
32
views
Errors in style/theme for Material3 components in legacy app
I'm trying to use SearchBar and SearchView from the material components library in my app. These are new components for Material 3.
implementation 'com.google.android.material:material:1.12.0'
...
0
votes
1
answer
90
views
Fragment UI visible through other fragments after theme switch even though onDestroyView() is called
This is a strange one. I have a standard application using tab navigation with one MainActivity and four Fragments that are swapped whenever a user clicks on a bottom tab.
Here's how the Fragments are ...
0
votes
1
answer
40
views
How to get color based on attribute name and current theme?
In the Markwon library, I want to add a plugin that will show an image from the application resources if write ![alt text](drawable://icon_name) in markdown format.
The code below works. But tintColor ...
1
vote
1
answer
61
views
Android TitleBar will not go away after upgrading from Flutter 3.16.5 to 3.24.1
We recently upgraded our Flutter app to 3.24.1 and noticed that our Android app now persistently shows the ToolBar, seemingly no matter what I do to the app's theme to address this. We know it's the ...
0
votes
2
answers
42
views
Android using theme values programatically
I want to create a style in a theme and use the values of it in code like this:
val bgColor = LIST_ITEM_BG_COLOR;
val textColor = LIST_ITEM_TEXT_COLOR
val strokeColor = ...
0
votes
1
answer
132
views
Change colorAccent according to theme for Android
In a MAUI project I want to adopt a different colorAccent value according to the theme of the application.
I tried to adopt this solution https://learn.microsoft.com/en-us/answers/questions/241870/how-...
0
votes
0
answers
17
views
SearchView expanded back button color
I have a fragment with Dark action bar (so white text and icon color)
im using the following menu item to create a searchview on click
<menu xmlns:android="http://schemas.android.com/apk/res/...
0
votes
0
answers
24
views
Theme.MaterialComponents.DayNight.NoActionBar is not working in light mode but work when dark mode is enable in android 14
My custom theme doesn't function when the mobile device is in light mode, but it does work when switched to dark mode on Android 14.(light and dark mode of system(mobile)).and show the white screen ...
0
votes
0
answers
146
views
Jetpack Compose Themes not applying
I have my own colors defined and set in Theme.kt file:
I followed Studio bot advice and set those to my colors.
But they just refuse to work. I get white and black respectively on light and dark theme ...
0
votes
0
answers
25
views
Android actionBar navigation icon not showing desired color
I have created a vector asset drawable with a given colour, but while setting it in actionBar navigation icon , it is showing dark not the desired colour
activity actionBar screenshot
actionBar xml
...
0
votes
0
answers
24
views
how to create transparent activity without action bar without title bar?
I've tried multiple ways to create a transparent full screen activity but the top and bottom bar are ways present.
here is the code I use:
in the styles.mxl
<resources xmlns:tools="http://...
0
votes
1
answer
55
views
Stop recreating fragment when changing theme in system
I have added five fragments in my activity. also i have added Theme.Material3.Light.NoActionBar theme to both of my day and night theme in app. when i change theme from quick toggle theme changer, ...
0
votes
1
answer
80
views
Styling on Android Checkbox Lost After Click
I'm trying to style some checkboxes (the box itself, not the label) to have a set color when checked vs unchecked.
To facilitate this, I created the following theme:
<style name="...
0
votes
0
answers
45
views
The default top app bar color changes after updating material version to 1.11.0
I designed my app to look like this:
But after updating the material library version from com.google.android.material:material:1.10.0 to com.google.android.material:material:1.11.0 the top app bar ...
0
votes
1
answer
49
views
Compose theme inconsistent behavior
I have a theme in my app set up like so:
//use light colors for dark mode
private val ConceptualSystemsDarkColorScheme = darkColorScheme(
primary = Yellowish,
secondary = YellowishBright,
...
1
vote
2
answers
599
views
Change app theme programmatically Android Studio using Kotlin
I'm making an Android application using Kotlin. It contains App Theme color list so the user can select one color from it, and then I save this color in Shared Preferences.
I've done with all Shared ...
0
votes
1
answer
498
views
Flickering Statusbar in Edge to Edge mode
I've just setup Edge2Edge mode on a new Android project. Generally that works fine, however on app startup there's a noticable moment where the status bar is not visible at all.
status bar is ...
0
votes
1
answer
114
views
Why doesn’t the theme change when changing the settings, but only when re-entering the application? Jetpack compose
there is a mainActivity in which the navHost is called and the drawer is called in it, and from it the settings screen
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun ...
1
vote
0
answers
74
views
Android Color Theme get Background Color
I need to get the Color of the default background color of the App in Code.
up until now i used R.attr.colorSurface to get this, but somehow lately this gives me the incorrect color on some devices.
...
0
votes
2
answers
395
views
Material3 Theme Builder - can't get all colors from preview
So I'm trying to use the following link to build theme for an app:
https://m3.material.io/theme-builder#/custom
But I can't figure out the following color of the container:
It's not listed anywhere ...
1
vote
0
answers
29
views
How to use MaterialTheme.colorScheme.primary inside a vector?
I have this vector:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="100dp"
android:height="100dp"
android:viewportWidth=&...
0
votes
0
answers
30
views
Android MaterialComponents Theme doesn't work properly
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.HiCharging.DayNight" parent="Theme....
1
vote
1
answer
1k
views
Jetpack Compose override parts of a theme from a library with a custom theme
I'm working on creating a library for our apps in compose which is intended to hold all view components needed. This library also needs to have a custom theme. Especially for colors and fonts as each ...
2
votes
1
answer
194
views
Android MaterialTimePicker custom styling
Im trying to apply a custom style to the MaterialTimePicker. And I still cant change some of the required colors:
Change the selected chip background color
Change the selected chip text color
Remove(...
1
vote
1
answer
1k
views
Apply Dark/Light theme locally Android Compose
My app designer uses ONE color scheme for the whole app that some elements are appears to be dark theme and in some other place, light theme.
What I want is to apply the dark theme on screen1 and ...
0
votes
1
answer
385
views
fontFamily and fontWeight not working in TextAppearance
I am trying to add multiple font-families in my app. Following is code that adds "inter" font.
Here's values/typography.xml
<?xml version="1.0" encoding="utf-8"?>
&...
0
votes
1
answer
42
views
update include tag data when app theme changed (recreating Activity)
I used multiple include tags in a xml layout like this:
<include
android:id="@+id/firstView"
layout="@layout/layout_edit_text"
android:layout_width="...
0
votes
1
answer
80
views
problem with displaying grid layout while app has different theme than system
i have a problem with my elements in Gridlayout which are not loading properly.
If my android app has a different theme than the system of my phone, elements are not visible.
I have normal grid layout ...
1
vote
0
answers
41
views
Material3 action bar doesn't allow to set background color programmatically
Trying to set a custom color for an certain Activity programmatically, but action bar doesn't react even when set setBackgroundDrawable(null). Any thoughts? Thanks
Style:
<style name="Theme....
0
votes
0
answers
40
views
how to I implement two dark modes in android?
I am trying to implement dark and light mode in my application, I want to have two dark modes one with grey background and the other with black background for OLED displays. Following is the code I am ...
1
vote
1
answer
3k
views
Edge to Edge Theme for Background of Android Activity to Hide Status Bar Scrim During Fragment Transitions
I have 1 activity that hosts multiple fragments in a navHostFragment. To switch between them I use androids Navigation Component (i.e. navGraph).
Now I want to enable edge-to-edge. I already have it ...
0
votes
2
answers
387
views
Default dark text color in dark mode on the action bar
In light mode I have no problems because everything is correct but in dark mode without making any changes the text remains dark. Is it an Android bug?
I have tried various methods but my problem is ...
0
votes
0
answers
119
views
Creating an extensible UI system using Androids Jetpack Compose and Themes
I'm new to Jetpack Compose and I've come across custom theming, which looks like the perfect solution for my use case.
At my Company we have a new UI system, where we have reusable components like ...
1
vote
1
answer
1k
views
why my icon colors or icons does not change when I switch theme in jetpack compose?
There is a screen in my application that I use to change the theme. There are three options named the same as light theme, dark theme and system. When you click on these options, the theme of the app ...
0
votes
1
answer
417
views
How to make custom input pin code Android?
I make project on Kotlin Android. How can i make the same field and same input? It seems to me creating a few edittexts is not good decision
enter image description here
enter image description here
...
0
votes
2
answers
871
views
How to change StatusBar color in Light and Dark Material 3 Jetpack compose?
I provide my own color to change statusbar color in my app but it don't work in Material 3.
Here is the default Light and Dark colors in Theme.kt file:
private val DarkColorScheme = darkColorScheme(
...
4
votes
1
answer
2k
views
Proper way of implementing full dark theme in Compose-only applications
I have a Compose-only application that gives users three options of theming:
System
Light
Dark
The theme is changed in Activity's onCreate() method by passing darkTheme argument to my app's theme ...
0
votes
1
answer
421
views
How To Implement Android Splash Screen API Without Changing The Current Theme
I would like to add the Android Splash Screen API to an already developed project based on this document, which has its own styles and themes. In the document it says that the theme in the application ...
2
votes
1
answer
774
views
Chip: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant)
I want to add a Chip view to ChipGroup in my project but always I get below error
My code in Activity
for (int i = 0; i < names.size(); i++) {
Chip chip = new Chip(getApplicationContext());
...
0
votes
1
answer
292
views
How to change app theme before first recomposition in Compose?
I have composable MainScreen and SettingsScreen. They all share a common ViewModel SettingsViewModel which is responsible for reading and saving theme settings.
In the MainActivity, before creating ...
1
vote
1
answer
842
views
How to use Open Source Notices library with Jetpack Compose?
I'm using the official Google library for open source notices: https://developers.google.com/android/guides/opensource
But when I try to start the activity
Button(
onClick = {
context....
0
votes
1
answer
34
views
Unable to minimize the gap between two adjacent buttons in a Neumorphism layout
I am currently working on a mobile application where I have implemented the Neumorphism design using the com.github.fornewid:neumorphism:0.3.0 library.
In my layout, I have a requirement to display ...
0
votes
0
answers
96
views
LazyColumn weird behaviour on scroll, when activity's window has transparent color
there is my lazy cloumn:
LazyColumn {
items(20) {
Text(
text = "hi$it",
color = Color.Green,
textAlign = TextAlign.Center,
...