After declaring a CheckboxPreference in my activity for my app's settings, a warning appears for as in the line 'val mCheckBoxPreference = findPreference("preference_a") as CheckBoxPreference'. What should be done so that the cast does…
I want to implement a 2 part preference screen. If checkbox is clicked, first category should lock and 2nd one unlock. If it's not, reverse. Now I see it only works if I go to previous activity and then to new (sharedPreferences). What listener…
I have 2 activites, MainActivity and SettingsActivity. When settings button is pushed, SettingsActivity is started and loads PreferenceFragment.
App immediately crashes on fragment start:
9188/com.app.android.judge E/AndroidRuntime: FATAL…
I have an CheckBoxPreference and i setOnPreferenceClickListener
mCheckBoxPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
…
I have a checkboxpreference which performs a tasks once it is clicked on. I want to uncheck it if the task fails. But I am not sure why it is not working.
The preferences.xml:
The problem is that a Toast appears as many times as you open Settings activity, while I need it only once after each click on CheckBox.
Thanks in advance to everyone, who tried to improve my code.
More detailed description of how the code works:
I…
I found the answer to my question here:
CheckBoxPreference with additional Button?
But I really did not understand how to do it. Probably due to the fact that I do not know much English.
I need to put into ChekBoksPreferens button.
Can anyone give…
I'm trying to change default-values in Settings.apk.
At first I added "android:default value" (0=right, 1=centered) to status_bar_clock_style.xml without success.
I have an issue with the title color of CheckBoxPreference in my settings screen.
I am using AppCompat with appcompat-v7:22.2.0.
On a Lollipop device, no issue. AppCompat lib works as expected, that is, CheckBoxPreference title is painted in…
I currently have the problem of a disabled checkbox preference which is enabled in the preference.xml. This happened after the migration to Metarial design. I tried to enable the view programmatically but it didn't help.
(I'd like to show a…
I have a screen where you can enable/disable modules for my Android application.
For this I use a CheckboxPreference screen. This is all good, but the summary field gets cut off if longer descriptions are added than 2 lines.
Suppose I have 4-5 lines…
The answers in this thread are not helping in any way.
I have one requirement where I want to do something when user long presses on CheckBoxPreference. I am dynamically creating the CheckBoxPreference inside activity. I am using below piece of code…
I am using PushBots in my Android Application but would like to give the user an option to Enable or Disable the Notifications. On the PushBots website, it says that running the code Pushbots.getInstance().setRegStatus(false); will do this for…
So to make things simple my app consists of a bunch of cards (Google style). In the settings the user can select which card is viewable in the main activity. My problem is that I cant figure how to update the main activity after the user selects…