preferencescreen

Failed to find provider in android TV Preferences fragment

萝らか妹 提交于 2021-02-10 14:51:51
问题 Getting Failed to find provider com.google.android.katniss.search.searchapi.VoiceInteractionProvider for user 0; expected to find a valid ContentProvider for this authority for tv Preference Fragment E/AndroidRuntime: FATAL EXCEPTION: main Process: com.omniwyse.tvprefdemo, PID: 2025 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.omniwyse.tvprefdemo/com.omniwyse.tvprefdemo.SettingActivity}: android.view.InflateException: Binary XML file line #18: Binary XML file line

PreferenceScreen - <intent …/> - Exception - FLAG_ACTIVITY_NEW_TASK

≡放荡痞女 提交于 2020-01-21 04:51:06
问题 I am new at android developing. The project is about implementing an AbstractAccountAuthenticator with an AbstractThreadedSyncAdapter to sync certain data on a server with a content provider. I made everything and both adding accounts and syncing is running without any problems. Now I've tried to add a Preference-Screen just like suggested in the android reference (search for AbstractAccountAuthenticator, it is explained there) via xml like this: autenticator.xml: <account-authenticator xmlns

How to make functioning Preference Screen?

我怕爱的太早我们不能终老 提交于 2020-01-14 06:23:27
问题 I have made a Preference Screen which I want to make function able. Sorry I can't post any Screen Shot of the Preference Screen as I have not gain required Reputation. Here's my PreferenceScreen code: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory android:title="Notifications"> <RingtonePreference android:summary="Choose a Ringtone" android:title="Notification Ringtone" android:key="ringtonePref" />

Custom Preference Android Kotlin

吃可爱长大的小学妹 提交于 2020-01-04 13:58:30
问题 I'd like to subclass Preference to create a custom preference item in Kotlin. I am unable to get the custom preference to inflate in the Preference screen. If I remove this custom preference from my preference screen, the rest of the preferences I have implemented (not shown here) are working fine. There are many similar seeming questions here, but none of the ones I've found directly deal with the issue of creating a Kotlin implementation of a custom preference. Please help me with a working

Pick .mp3 file from sdcard in preferencescreen

泪湿孤枕 提交于 2019-12-25 07:14:05
问题 How i can pick mp3 file from sdcard in android preferenceScreen menu.. here is my preferenceScreen: <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="@string/app_setting"> <Preference android:title="@string/ChooseRingtone" android:key="sdPref" /> </PreferenceCategory> </PreferenceScreen> here my SettingActivity: public class SettingsActivity extends AppCompatPreferenceActivity{ @Override public void onCreate(Bundle

Android CheckBoxPreference title color

試著忘記壹切 提交于 2019-12-25 01:19:05
问题 I am using the code in this answer. But instead of setting the android:textColor for the Text View i use style="?background_text_color_theme" which has to set the text color depending on the theme of the application ( white text color for black theme and vice versa). This works in all other places except for CheckBoxPreference. Changes I made to the link I gave: <TextView android:id="@+android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android

How to make things done on Preferences being changed?

≯℡__Kan透↙ 提交于 2019-12-24 15:53:20
问题 I've set up a Preference Screen as a settings option in my App, but I am totally confused about how to make the changes done when user selects or changes an Option. Here's the xml code of my PreferenceScreen: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory android:title="Notifications"> <RingtonePreference android:summary="Choose a Ringtone" android:title="Notification Ringtone" android:key="ringtonePref

Android PreferenceScreen onChangeListener not invoked

佐手、 提交于 2019-12-24 10:55:15
问题 i wrote a simple PreferenceScreen, looks as follows: public class SettingsActivity extends PreferenceActivity implements OnPreferenceChangeListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); PreferenceScreen prefScreen = getPreferenceScreen(); prefScreen.setOnPreferenceChangeListener(this); } @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference

Appcompatactivity with custom native (not compatibility) dialogpreference containing a TimePicker

断了今生、忘了曾经 提交于 2019-12-24 10:36:41
问题 I am building a preferences / settings screen inside an Android AppCompatActivity . One requirement is a custom [DialogPreference][1] with a TimePicker . The DialogPreference must be 'native', meaning not the compatibility version like described here and here. The code for the AppCompatActivity: ... public class SettingsActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity

Nested Preference Screen closes on Screenorientation change in Android

て烟熏妆下的殇ゞ 提交于 2019-12-24 03:30:58
问题 I recently stumbled upon a problem. I am working with a Nested PreferenceScreen like this: <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceScreen android:key="pref_name" android:title="@string/pref_title" > </PreferenceScreen> When my screen has the focus on the Nested Preference Screen and I change screenorientation, the Nested PreferenceScreen closes. I have also tried including: android:configChanges="orientation|keyboardHidden" in AndroidManifest