While implementing the setup window with Preferences, I gave the id value as logout and tried to display the alternative log window, "Do you want to log in?" but I don't know what to do. Please help me
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Account Management">
<Preference
Android:summary="Logout."
android:title="Logout"
android:key="logout"
android:id="@+id/logout"
>
</Preference>
</PreferenceCategory>
<Preference Category android:title="Application Information" >
<Preference
android:summary="Check developer information"
android:title="Developer Information" >
</Preference>
<Preference
android:summary="Send mail to developer"
android:title="Send Mail" >
<intent
android:action="android.intent.action.SENDTO"
android:data="mailto:[email protected]" />
</Preference>
</PreferenceCategory>
</PreferenceScreen>
This is the XML screen!
android
Receive the onPreferenceChange event in the OnPreferenceChangeListener
String key = preference.getKey();
if(key.equals("logout")){ // // showdlg~ }
I think you can do it. ^
^
© 2024 OneMinuteCode. All rights reserved.