Add the function in settings
This commit is contained in:
parent
c6d10fcf0e
commit
4d9295b42b
|
@ -105,6 +105,19 @@ public class SettingsFragment extends Fragment {
|
|||
});
|
||||
|
||||
|
||||
boolean display_card = sharedpreferences.getBoolean(Helper.SET_DISPLAY_CARD, true);
|
||||
|
||||
final CheckBox set_display_card = rootView.findViewById(R.id.set_display_card);
|
||||
set_display_card.setChecked(display_card);
|
||||
set_display_card.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
editor.putBoolean(Helper.SET_DISPLAY_CARD, set_display_card.isChecked());
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
boolean show_media_urls = sharedpreferences.getBoolean(Helper.SET_MEDIA_URLS, false);
|
||||
final CheckBox set_auto_add_media_url = rootView.findViewById(R.id.set_auto_add_media_url);
|
||||
|
|
|
@ -284,6 +284,7 @@ public class Helper {
|
|||
public static final String SET_ENABLE_TIME_SLOT = "set_enable_time_slot";
|
||||
public static final String SET_KEEP_BACKGROUND_PROCESS = "set_keep_background_process";
|
||||
public static final String SET_DISPLAY_EMOJI = "set_display_emoji";
|
||||
public static final String SET_DISPLAY_CARD = "set_display_card";
|
||||
public static final int S_512KO = 1;
|
||||
public static final int S_1MO = 2;
|
||||
public static final int S_2MO = 3;
|
||||
|
|
|
@ -166,6 +166,13 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_emoji"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_card"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_card"
|
||||
android:layout_height="wrap_content" />
|
||||
<!-- Resize pictures -->
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
|
|
|
@ -168,6 +168,12 @@
|
|||
android:text="@string/set_display_emoji"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_card"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_card"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- Resize pictures -->
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
|
|
|
@ -655,6 +655,7 @@
|
|||
<string name="channels">Channels</string>
|
||||
<string name="set_display_emoji">Use Emoji One</string>
|
||||
<string name="information">information</string>
|
||||
<string name="set_display_card">Display cards in all toots</string>
|
||||
|
||||
<string-array name="filter_expire">
|
||||
<item>Never</item>
|
||||
|
|
Loading…
Reference in New Issue