Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Does GBoard respect forced dark theme?

If I force the dark theme in my app with AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES), should GBoard respect that and use the dark theme too? It isn't for me and I'm ...
Barry Fruitman's user avatar
0 votes
0 answers
28 views

Text in Spinner Not Visible After Selection in Dark Mode

I'm a beginner in Android development, and I'm encountering an issue with a Spinner in my Android application. When I switch to dark mode, the text color of the selected item in the Spinner becomes ...
Hitesh Prajapati's user avatar
1 vote
3 answers
69 views

color of text changes to white in dark theme

Text( style = profileItem text = priceStyle(order.total!!), modifier = Modifier .padding(start = 2.dp), ) val profileItem = TextStyle( ...
nima's user avatar
  • 15
0 votes
1 answer
371 views

How to use two different images for light and dark mode in android studio using XML only?

My light mode image appears but when I use another image for dark mode, my dark mode page turns black with everything in it. I'll share my xml here for better understanding: bg_light_layer xml: <?...
Nizar Ahmed's user avatar
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 ...
Michal Rymarski's user avatar
0 votes
1 answer
272 views

Net MAUI MAPS Dark Mode

i've read this How to display google maps in dark mode in a .NET MAUI (Android) app but gives NO real answer (MapType.StreetNight does NOT exists).. is it possibile to set dark/light mode in a map ...
Denis De Pauli 's user avatar
0 votes
0 answers
32 views

I have a problem with my dark theme in app kotlin

I have a problem with my dark theme, my new Samsung a54 doesn't make dark theme in my app, however old xiaomi and other phones do well and switch to dark theme. I didn't do anything with code. What ...
veterok's user avatar
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 ...
T D Nguyen's user avatar
  • 7,565
0 votes
0 answers
68 views

AppCompatDelegate.setDefaultNightMode does not apply theme to all the activites

After changing the theme using AppCompatDelegate.setDefaultNightMode, the change is visible there, but upon returning to the previous activity, the theme remains unchanged. This issue occurs on the ...
Sergio Viudes's user avatar
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 ...
Davide Torchia's user avatar
0 votes
1 answer
118 views

Switching between Light and Dark mode without manual style

I write an App with Xamarin.forms, and I want to change between light and dark mode. I want to have a switch to change between the two modes. So each time the switch is toggled I set App.Current....
Emil G's user avatar
  • 3
0 votes
0 answers
41 views

When my activity recreates TextInputEditText all methods (beforeTextChanged, onTextChanged, afterTextChanged ) called pointlessly

I change the darkTheme as follows in the SettingsFragment under MainActivity and MainActivity is recreated normally. However, when I return to the MainFragment later, all the methods in the ...
Rüçhan Okal's user avatar
0 votes
0 answers
679 views

Dark overlay over screen in jetpack compose android kotlin

This is how the screen looks in dark mode If you couldn't see anything selected, here is the image with a selected box I don't know whats causing the problem. And I thinking If I explain you my app ...
Narayan Dutt Purohit's user avatar
0 votes
1 answer
609 views

How to correctly set the ForceDarkAllowed to false in jetpack compose app

I want to set the ForceDarkAllowed to false in jetpack compose app. I've found the information about the flag in the answer to this question. There are 2 ways mentioned how this flag can be set. None ...
zap's user avatar
  • 167
0 votes
1 answer
485 views

How to declare colors based on dark theme enabled or not, in compose with material 3

in my app, I have some custom colors and I use this method to know if the dark theme is enabled but there are some colors I want to make global based on the dark theme to use it from any composable ...
Dr Mido's user avatar
  • 2,684
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 ...
l'hiverviendra's user avatar
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 ...
Mikhail's user avatar
  • 3,255
1 vote
2 answers
504 views

What is difference between Dark Mode and Dark Theme for any website and application?

I am new in UI development, I was asked above question in the interview. I got confuse because as per my understanding there is no difference. Kindly guide me is there is any difference.
Indrajeet4192's user avatar
0 votes
1 answer
374 views

Getting system theme setting of Android in Xamarin.Forms

I have three radio buttons for selecting my app's theme: Default, which should apply whichever theme is selected in Android's system settings, Light and Dark. The problem is that whenever I select the ...
Costas's user avatar
  • 577
0 votes
3 answers
356 views

App theme doesn't load correctly if the system theme is light and the app theme is dark

If the system theme is light and the app theme is dark, the actionbar items are dark when the app startup. (left picture) When I reload the dark theme again from the in-app settings, the actionbar ...
TheAnswer042's user avatar
4 votes
0 answers
735 views

How to set specific fragment to only Dark theme while rest of the app is DayNight?

In my app I have one fragment where I need to use colors only from dark theme pallet. My base AppTheme is extending from DayNight and I have colors.xml in both values and values-night folder with ...
Marat's user avatar
  • 6,673
6 votes
1 answer
2k views

Changing between Light/Dark modes doesn't update colors of running app. Theme is applied only after restarting app

Run into strange behaviour when trying to add support for dark theme in existing app. I added values-night folder where I added new colors.xml with different hex for dark mode. Then I extended from ...
Marat's user avatar
  • 6,673
0 votes
1 answer
364 views

How do I add a dark mode option in a ListView?

I have a ListView with the app's more technical details and I want to implement a dark theme manual switch like this: If it helps, here's the OnClickListener I use: aboutListView....
MASAN's user avatar
  • 95
34 votes
3 answers
19k views

Android Jetpack Compose Preview UI_MODE_NIGHT_YES does not show dark background in preview

I am following https://developer.android.com/jetpack/compose/tutorial and the code @Preview(name = "Light Mode") @Preview(name = "Dark Mode", uiMode = Configuration....
rofrol's user avatar
  • 15.1k
0 votes
0 answers
237 views

Dark mode list preference not working. Is dark for a second and then is light

I added adaptive themes in my application using List Preferences and it does not work. Sometimes when I create Build APK and test Preferences, the theme it sets to dark for a second and returns to the ...
D4rK's user avatar
  • 309
0 votes
1 answer
225 views

Android Studio Dark Theme Function

There's is a problem with the dark/light mode function.When I want to turn on dark mode theme it seems that it writes the name of my app in the toolbar, something that I don't want. For example : It ...
Emil Mester's user avatar
1 vote
1 answer
387 views

How to switch to dark theme?

I need to switch to a dark theme in the application, I do it like this: private fun onOffDarkTheme() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { when (...
Binary's user avatar
  • 431
1 vote
0 answers
1k views

Android. Xiaomi (android 10+) mode_night_follow_system wrong color when phone system theme is dark [duplicate]

the problem is: When I open the application, I set the theme according to the theme of the device. In android code it is = mode_night_follow_system. Let's imagine that the theme of the system(device) ...
Sky's user avatar
  • 520
1 vote
2 answers
694 views

Force app widget's light theme on OnePlus phone with Android 12

I have a problem with forcing a light theme of home screen app widget on OnePlus 9 phone with Android 12 (using the OnePlus' launcher). My widget's theme inherits from Theme.MaterialComponents.Light ...
shelll's user avatar
  • 3,353
1 vote
2 answers
911 views

How to keep dark mode enabled even after killing the app?

This is my code in settings.java class. I have implemented my settings class like this. I want to make dark theme on and after killing the app it has to be present there as well and toggle has to be ...
who the gamer's user avatar
0 votes
2 answers
1k views

My React Native app is lagging in the light mode, but is superfast in the dark

I am creating a React Native app with light and dark modes. The colors of all components in the app are controlled with my custom hook: export const useColors = (): UseColorsResult => { const ...
Anton L.'s user avatar
  • 798
1 vote
3 answers
1k views

App launches 2 times while selecting dark mode

I started to encounter this error when I upgraded the version of the project to androidx. I also upgraded the all implementation sdks. I upgraded min sdk from 16 to 19. Before making these upgrades, ...
Muratcan Yıldız's user avatar
-1 votes
2 answers
991 views

How can change my Delphi Android App to "Dark mode"?

I have my app in Delphi 10.3 for Android and I'm trying to convert it to "dark mode" but many controls are missing a color attribute so some are still bright white. I have no idea how to ...
Wolfgang Bures's user avatar
1 vote
0 answers
65 views

How do I check whether night mode was turned on or off

I don't want to know what is the current going on mode (dark or light) in my android device. I want to know if the mode was switched at the time my android activity was running. How do I put a check ...
Utkarsh Sahu's user avatar
2 votes
1 answer
3k views

How do I keep my android activity keep on going even if somebody switches from dark mode to day mode or vice versa (using Java)

The problem is that when I switch from dark mode to light mode (android dark mode and android light mode), the activity which was going on that works fine but a duplicate activity starts all over ...
Utkarsh Sahu's user avatar
2 votes
0 answers
414 views

Force light mode on single View

I have an Android app which supports night mode by inheriting the theme from Theme.MaterialComponents.DayNight.NoActionBar. This works perfectly fine. However, for a specific View, I want to force ...
ubuntudroid's user avatar
  • 3,969
0 votes
2 answers
2k views

Turn off dark mode on device programatically. (or other solution) Android studio Kotlin

So I need a little help here. My problem is, that when I have a function in my app for changing to dark mode, then when I change it when the device is in light mode, it changes just fine, but when I ...
Guard_SK's user avatar
2 votes
0 answers
303 views

MODE_NIGHT_FOLLOW_SYSTEM not working after MODE_NIGHT_YES

I have the next code to force dark mode depending the store of the user. if (storeProvider.shouldForceDarkMode) { appProvider.theme = AppProvider.AppTheme.DARK AppCompatDelegate....
Rubearen's user avatar
0 votes
2 answers
1k views

I am unable to do dark theme in my app with using forceDarkAllowed

*I have used forceDarkAllowed but it's not working on my android mobile. It's still showing me a light theme. I have shared my theme.xml file here. I am trying to implement a dark theme without using ...
Saveen Khan's user avatar
1 vote
1 answer
667 views

Material3 replacement for PrimarySurface

I've started to replace styles with the new Material3 ones (Material You) which are present in the latest Material Design Components library. However, I don't see a replacement for Widget....
niqueco's user avatar
  • 2,388
1 vote
1 answer
856 views

Actionbar background style not changing in dark theme

Creating the first app, I changed the actionbar's background to teal. The problem is that it worked on light theme but not on dark theme. Tested on both pixel 3 XL emulator and 2 different samsung ...
AlikElzin-kilaka's user avatar
1 vote
2 answers
1k views

System Dark mode setting problem (More Dark mode options)

Hello‚ I had a problem with the night mode in my program. Switching from the phone system to night mode did not change the black text to white. It was just black. I found a solution through ...
NONAME's user avatar
  • 37
0 votes
1 answer
1k views

Elevation overlay for a standard BottomSheet

I'm following the material3 spec, using the android material components lib, and implementing light and dark themes. I have a ConstraintLayout acting as a BottomSheet, and its background color should ...
Ronan's user avatar
  • 426
4 votes
2 answers
8k views

Proper way to Implement Dark Theme Android Java

I am learning how to implement Dark Theme to application. After reading documents from this, below are the requirements that I understand make sure "Style" parent = <style name="...
Arduino's user avatar
  • 315
1 vote
0 answers
581 views

context.getTheme().resolveAttribute() returns incorrect color value on Android 12 when UIMode changes

To avoid UI recreate I add these code to My Project. AndroidManifest.xml ... <activity android:windowSoftInputMode="adjustResize" android:configChanges="keyboardHidden|...
John 6's user avatar
  • 158
0 votes
1 answer
290 views

Formatted String Resource Not Appearing When Dark Theme Enabled

I've been running through the first two parts of this Android Developer CodeLab. I've created a working tip-calculator with no issues until I've implemented Dark Theme. Without Dark Theme enabled, my ...
John Harrington's user avatar
0 votes
1 answer
663 views

TextView in a custom view is not switching text color in night mode

Using: com.google.android.material:material:1.4.0 If I have a layout xml file in a fragment/activity with a TextView: <TextView style="@style/TextAppearance.MaterialComponents.Body1" ...
lostintranslation's user avatar
0 votes
1 answer
1k views

Android app dark theme gone after application killed and restarted

I am trying to implement light/dark theme in my app. The change of themes works fine if I don't kill the app. But if I do, for example, before killing it I had set it to Dark theme. After restarting ...
haruya's user avatar
  • 57
0 votes
1 answer
3k views

Dark theme and light theme problem - android studio (night)

I will try to explain in detail‚ please help. I opened a new project‚ in the new project the "theme" section was opened twice‚ one light one dark. I added black text to the app ‚the text ...
Jaloliddin's user avatar
2 votes
2 answers
2k views

dark mode interfering with background color

I'm trying to apply background colors to my app and for some reason I can't get the right colors for example: <View style={{backgroundColor:'yellow'}}></View> but I'm getting the first ...
user avatar