Some improvements

This commit is contained in:
tom79 2019-07-03 09:43:29 +02:00
parent 69111c6036
commit dba52b699c
8 changed files with 279 additions and 240 deletions

View File

@ -1149,7 +1149,6 @@ public abstract class BaseMainActivity extends BaseActivity
//final SwitchCompat set_push_hometimeline = dialogView.findViewById(R.id.set_push_hometimeline);
final SwitchCompat set_push_notification = dialogView.findViewById(R.id.set_push_notification);
boolean notif_hometimeline = sharedpreferences.getBoolean(Helper.SET_NOTIF_HOMETIMELINE, false);
boolean notif_follow = sharedpreferences.getBoolean(Helper.SET_NOTIF_FOLLOW, true);
boolean notif_add = sharedpreferences.getBoolean(Helper.SET_NOTIF_ADD, true);
boolean notif_ask = sharedpreferences.getBoolean(Helper.SET_NOTIF_ASK, true);
@ -1170,7 +1169,6 @@ public abstract class BaseMainActivity extends BaseActivity
editor.putBoolean(Helper.SET_NOTIF_MENTION, set_push_notification.isChecked());
editor.putBoolean(Helper.SET_NOTIF_SHARE, set_push_notification.isChecked());
editor.putBoolean(Helper.SET_NOTIF_POLL, set_push_notification.isChecked());
// editor.putBoolean(Helper.SET_NOTIF_HOMETIMELINE, set_push_hometimeline.isChecked());
editor.putBoolean(Helper.SET_POPUP_PUSH, true);
editor.apply();
/*if( set_push_notification.isChecked() ){

View File

@ -170,23 +170,27 @@ public class SettingsActivity extends BaseActivity implements ViewAnimator.ViewA
}
private void createMenuList() {
SlideMenuItem menuItem0 = new SlideMenuItem(ContentSettingsFragment.type.CLOSE, R.drawable.ic_close);
list.add(menuItem0);
SlideMenuItem menuItem1 = new SlideMenuItem(ContentSettingsFragment.type.TIMELINES, R.drawable.ic_timeline_menu_s);
list.add(menuItem1);
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA){
SlideMenuItem menuItem2 = new SlideMenuItem(ContentSettingsFragment.type.ADMIN, R.drawable.ic_security_admin_menu);
list.add(menuItem2);
}
SlideMenuItem menuItem3 = new SlideMenuItem(ContentSettingsFragment.type.NOTIFICATIONS, R.drawable.ic_notifications_menu);
list.add(menuItem3);
SlideMenuItem menuItem4 = new SlideMenuItem(ContentSettingsFragment.type.INTERFACE, R.drawable.ic_tablet_menu);
list.add(menuItem4);
SlideMenuItem menuItem5 = new SlideMenuItem(ContentSettingsFragment.type.COMPOSE, R.drawable.ic_edit_black_menu);
list.add(menuItem5);
SlideMenuItem menuItem6 = new SlideMenuItem(ContentSettingsFragment.type.HIDDEN, R.drawable.ic_visibility_off_menu);
list.add(menuItem6);
SlideMenuItem menuItemClose = new SlideMenuItem(ContentSettingsFragment.type.CLOSE, R.drawable.ic_close);
SlideMenuItem menuItemTimeline = new SlideMenuItem(ContentSettingsFragment.type.TIMELINES, R.drawable.ic_timeline_menu_s);
SlideMenuItem menuItemNotification = new SlideMenuItem(ContentSettingsFragment.type.NOTIFICATIONS, R.drawable.ic_notifications_menu);
SlideMenuItem menuItemAdmin = new SlideMenuItem(ContentSettingsFragment.type.ADMIN, R.drawable.ic_security_admin_menu);
SlideMenuItem menuItemInterface = new SlideMenuItem(ContentSettingsFragment.type.INTERFACE, R.drawable.ic_tablet_menu);
SlideMenuItem menuItemEdit = new SlideMenuItem(ContentSettingsFragment.type.COMPOSE, R.drawable.ic_edit_black_menu);
SlideMenuItem menuItemHidden = new SlideMenuItem(ContentSettingsFragment.type.HIDDEN, R.drawable.ic_visibility_off_menu);
SlideMenuItem menuItem7 = new SlideMenuItem(ContentSettingsFragment.type.ALL, R.drawable.ic_all_inclusive_menu);
SlideMenuItem menuItemBattery = new SlideMenuItem(ContentSettingsFragment.type.BATTERY, R.drawable.ic_battery_alert_menu);
list.add(menuItemClose);
list.add(menuItemTimeline);
list.add(menuItemNotification);
list.add(menuItemInterface);
list.add(menuItemBattery);
list.add(menuItemEdit);
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA){
list.add(menuItemAdmin);
}
list.add(menuItemHidden);
list.add(menuItem7);
}

View File

@ -89,6 +89,7 @@ import static android.app.Activity.RESULT_OK;
import static android.content.Context.MODE_PRIVATE;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.ADMIN;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.ALL;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.BATTERY;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.COMPOSE;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.HIDDEN;
import static app.fedilab.android.fragments.ContentSettingsFragment.type.INTERFACE;
@ -112,6 +113,7 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
INTERFACE,
COMPOSE,
HIDDEN,
BATTERY,
ALL
}
@ -232,6 +234,7 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
LinearLayout settings_compose = rootView.findViewById(R.id.settings_compose);
LinearLayout settings_hidden = rootView.findViewById(R.id.settings_hidden);
LinearLayout settings_to_do = rootView.findViewById(R.id.settings_to_do);
LinearLayout settings_battery = rootView.findViewById(R.id.settings_battery);
if(type == null || type.equals(TIMELINES)){
settings_timeline.setVisibility(View.VISIBLE);
@ -241,6 +244,8 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
settings_admin.setVisibility(View.VISIBLE);
}else if(type == INTERFACE){
settings_interface.setVisibility(View.VISIBLE);
}else if(type == BATTERY){
settings_battery.setVisibility(View.VISIBLE);
}else if(type == COMPOSE){
settings_compose.setVisibility(View.VISIBLE);
}else if( type == HIDDEN){
@ -281,48 +286,7 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
count4 = 0;
count5 = 0;
final Spinner battery_layout_spinner = rootView.findViewById(R.id.battery_layout_spinner);
ArrayAdapter<CharSequence> adapterBattery = ArrayAdapter.createFromResource(getContext(),
R.array.battery_profiles, android.R.layout.simple_spinner_item);
battery_layout_spinner.setAdapter(adapterBattery);
int positionSpinner = sharedpreferences.getInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_NORMAL) -1;
battery_layout_spinner.setSelection(positionSpinner);
battery_layout_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if( count2 > 0){
SharedPreferences.Editor editor = sharedpreferences.edit();
switch (position){
case 0:
editor.putInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_NORMAL);
editor.apply();
break;
case 1:
editor.putInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_MEDIUM);
editor.apply();
break;
case 2:
editor.putInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_LOW);
editor.apply();
break;
}
Helper.changeBatteryProfile(context);
if( position < 2 ){
try {
((MainActivity) context).startSreaming();
}catch (Exception ignored){ignored.printStackTrace();}
}else{
context.sendBroadcast(new Intent("StopLiveNotificationService"));
}
}else {
count2++;
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
TagsEditText set_featured_tags = rootView.findViewById(R.id.set_featured_tags);
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON){
@ -671,24 +635,7 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
}
});
boolean old_direct_timeline = sharedpreferences.getBoolean(Helper.SET_OLD_DIRECT_TIMELINE, false);
final CheckBox set_old_direct_timeline = rootView.findViewById(R.id.set_old_direct_timeline);
set_old_direct_timeline.setChecked(old_direct_timeline);
set_old_direct_timeline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_OLD_DIRECT_TIMELINE, set_old_direct_timeline.isChecked());
editor.apply();
if( getActivity() != null)
getActivity().recreate();
Intent intent = new Intent(context, MainActivity.class);
if(getActivity() != null)
getActivity().finish();
startActivity(intent);
}
});
boolean hide_delete_notification_on_tab = sharedpreferences.getBoolean(Helper.SET_HIDE_DELETE_BUTTON_ON_TAB, false);
final CheckBox set_hide_delete_notification_on_tab = rootView.findViewById(R.id.set_hide_delete_notification_on_tab);
@ -1505,7 +1452,6 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
boolean notif_wifi = sharedpreferences.getBoolean(Helper.SET_WIFI_ONLY, false);
boolean notif_silent = sharedpreferences.getBoolean(Helper.SET_NOTIF_SILENT, false);
boolean notif_hometimeline = sharedpreferences.getBoolean(Helper.SET_NOTIF_HOMETIMELINE, false);
final String time_from = sharedpreferences.getString(Helper.SET_TIME_FROM, "07:00");
final String time_to = sharedpreferences.getString(Helper.SET_TIME_TO, "22:00");
@ -1518,7 +1464,6 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
final CheckBox set_notif_follow_share = rootView.findViewById(R.id.set_notif_follow_share);
final CheckBox set_notif_follow_poll = rootView.findViewById(R.id.set_notif_follow_poll);
final CheckBox set_notif_hometimeline = rootView.findViewById(R.id.set_notif_hometimeline);
final SwitchCompat switchCompatWIFI = rootView.findViewById(R.id.set_wifi_only);
final SwitchCompat switchCompatSilent = rootView.findViewById(R.id.set_silence);
@ -1741,19 +1686,12 @@ public class ContentSettingsFragment extends Fragment implements ScreenShotable
set_notif_follow_mention.setChecked(notif_mention);
set_notif_follow_share.setChecked(notif_share);
set_notif_follow_poll.setChecked(notif_poll);
set_notif_hometimeline.setChecked(notif_hometimeline);
switchCompatWIFI.setChecked(notif_wifi);
switchCompatSilent.setChecked(notif_silent);
set_notif_hometimeline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_HOMETIMELINE, set_notif_hometimeline.isChecked());
editor.apply();
}
});
set_notif_follow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -630,7 +630,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
public void onResume(){
super.onResume();
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
int batteryProfile = sharedpreferences.getInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_NORMAL);
if (type == RetrieveFeedsAsyncTask.Type.HOME){
if( getUserVisibleHint() ){
statusListAdapter.updateMuted(mutedAccount);
@ -643,7 +642,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_FEDERATED + userId + instance, true);
editor.apply();
if(liveNotifications && batteryProfile == Helper.BATTERY_PROFILE_NORMAL) {
if(liveNotifications) {
streamingFederatedIntent = new Intent(context, StreamingFederatedTimelineService.class);
try {
context.startService(streamingFederatedIntent);
@ -658,7 +657,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_LOCAL + userId + instance, true);
editor.apply();
if( liveNotifications && batteryProfile == Helper.BATTERY_PROFILE_NORMAL) {
if( liveNotifications ) {
streamingLocalIntent = new Intent(context, StreamingLocalTimelineService.class);
try {
context.startService(streamingLocalIntent);
@ -731,7 +730,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
if( context == null)
return;
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
int batteryProfile = sharedpreferences.getInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_NORMAL);
//Store last toot id for home timeline to avoid to notify for those that have been already seen
if (type == RetrieveFeedsAsyncTask.Type.HOME ) {
if (visible) {
@ -744,7 +742,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_FEDERATED + userId + instance, true);
editor.apply();
if(liveNotifications && batteryProfile == Helper.BATTERY_PROFILE_NORMAL) {
if(liveNotifications ) {
streamingFederatedIntent = new Intent(context, StreamingFederatedTimelineService.class);
try {
context.startService(streamingFederatedIntent);
@ -765,7 +763,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_LOCAL + userId + instance, true);
editor.apply();
if( liveNotifications && batteryProfile == Helper.BATTERY_PROFILE_NORMAL) {
if( liveNotifications ) {
streamingLocalIntent = new Intent(context, StreamingLocalTimelineService.class);
try {
context.startService(streamingLocalIntent);

View File

@ -334,8 +334,6 @@ public class Helper {
public static final String SET_DISPLAY_EMOJI = "set_display_emoji";
public static final String SET_DISPLAY_CARD = "set_display_card";
public static final String SET_DISPLAY_VIDEO_PREVIEWS= "set_display_video_previews";
public static final String SET_OLD_DIRECT_TIMELINE = "sset_old_direct_timeline";
public static final String SET_BATTERY_PROFILE = "set_battery_profile";
public static final String SET_DEFAULT_LOCALE_NEW = "set_default_locale_new";
public static final String SET_NOTIFICATION_ACTION = "set_notification_action";
public static final String SET_DISPLAY_CONTENT_AFTER_FM = "set_display_content_after_fm";
@ -367,9 +365,6 @@ public class Helper {
public static final int VIDEO_MODE_WEBVIEW = 1;
public static final int VIDEO_MODE_DIRECT = 2;
public static final int BATTERY_PROFILE_NORMAL = 1;
public static final int BATTERY_PROFILE_MEDIUM = 2;
public static final int BATTERY_PROFILE_LOW = 3;
public static final int THEME_LIGHT = 1;
public static final int THEME_DARK = 2;
@ -404,7 +399,6 @@ public class Helper {
public static final String SET_NOTIF_VALIDATION = "set_share_validation";
public static final String SET_NOTIF_VALIDATION_FAV = "set_share_validation_fav";
public static final String SET_WIFI_ONLY = "set_wifi_only";
public static final String SET_NOTIF_HOMETIMELINE = "set_notif_hometimeline";
public static final String SET_NOTIF_SILENT = "set_notif_silent";
public static final String SET_EXPAND_CW = "set_expand_cw";
public static final String SET_EXPAND_MEDIA = "set_expand_media";
@ -3615,29 +3609,6 @@ public class Helper {
}
}
public static void changeBatteryProfile(Context context){
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int batteryProfile = sharedpreferences.getInt(Helper.SET_BATTERY_PROFILE, Helper.BATTERY_PROFILE_NORMAL);
SharedPreferences.Editor editor = sharedpreferences.edit();
switch (batteryProfile){
case BATTERY_PROFILE_NORMAL:
editor.putBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
editor.putBoolean(Helper.SET_KEEP_BACKGROUND_PROCESS, true);
editor.apply();
break;
case BATTERY_PROFILE_MEDIUM:
editor.putBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
editor.putBoolean(Helper.SET_KEEP_BACKGROUND_PROCESS, false);
editor.apply();
break;
case BATTERY_PROFILE_LOW:
editor.putBoolean(Helper.SET_LIVE_NOTIFICATIONS, false);
editor.putBoolean(Helper.SET_KEEP_BACKGROUND_PROCESS, false);
editor.apply();
break;
}
}
public static String[] getLocales(Context context){
String[] locale = new String[20];

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M15.67,4L14,4L14,2h-4v2L8.33,4C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33L17,5.33C17,4.6 16.4,4 15.67,4zM13,18h-2v-2h2v2zM13,14h-2L11,9h2v5z"/>
</vector>

View File

@ -39,61 +39,119 @@
android:layout_height="match_parent"
android:visibility="gone"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_remember_position"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_remember_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_remember_position_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_blur_sensitive"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_blur_sensitive"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_blur_sensitive_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<!-- EXPAND CW -->
<CheckBox
android:id="@+id/set_remember_position"
android:id="@+id/set_expand_cw"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_remember_position"
android:text="@string/expand_cw"
android:layout_height="wrap_content" />
<!-- EXPAND Images -->
<CheckBox
android:id="@+id/set_old_direct_timeline"
android:id="@+id/set_expand_image"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_old_direct_timeline"
android:text="@string/expand_image"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_hide_delete_notification_on_tab"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_hide_delete_notification_on_tab"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_blur_sensitive"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_blur_sensitive"
android:layout_height="wrap_content" />
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_long_press_media"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_long_press_media"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_long_press_media_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<CheckBox
android:id="@+id/set_long_press_media"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_long_press_media"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_timeline_in_list"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_timeline_in_list"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_display_news"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_display_news_from_fedilab"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/set_share_validation"
@ -121,23 +179,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<!-- LIVE NOTIFICATIONS SETTINGS -->
<CheckBox
android:id="@+id/set_live_notify"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/live_notif"
android:layout_height="wrap_content" />
<!-- BACKGROUND PROCESS SETTINGS -->
<CheckBox
android:id="@+id/set_keep_background_process"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_keep_background_process"
android:layout_height="wrap_content" />
<LinearLayout
@ -387,43 +429,6 @@
android:layout_height="wrap_content" />
<!-- END NOTIFICATIONS SETTINGS -->
<!-- NOTIFICATION CONTENT NEW -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="?colorAccent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/settings_category_notif_news"
android:textColor="?colorAccent"
android:textSize="16sp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="?colorAccent" />
</LinearLayout>
<!-- New hometimeline content -->
<CheckBox
android:id="@+id/set_notif_hometimeline"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/set_notification_news"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -464,7 +469,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:paddingBottom="10dp"
android:orientation="horizontal">
<TextView
android:text="@string/settings_time_from"
@ -492,6 +496,12 @@
android:layout_height="wrap_content"
android:entries="@array/action_notification"/>
</LinearLayout>
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_enable_time_slot_indication"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- MORE OPTIONS SETTINGS -->
<LinearLayout
android:layout_width="match_parent"
@ -640,6 +650,65 @@
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_display_timeline_in_list"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_display_timeline_in_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_display_timeline_in_list_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_display_news"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_display_news_from_fedilab"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_display_news_from_fedilab_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<!-- DISPLAY NEW BADGE -->
<CheckBox
android:id="@+id/set_display_new_badge"
@ -729,6 +798,77 @@
</LinearLayout>
<!-- BATTERY -->
<LinearLayout
android:id="@+id/settings_battery"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_live_notify"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/live_notif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/live_notif_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:orientation="horizontal">
<CheckBox
android:id="@+id/set_keep_background_process"
android:layout_width="wrap_content"
android:textSize="16sp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:text="@string/set_keep_background_process"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:textColor="@color/mastodonC2"
android:text="@string/set_keep_background_process_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- COMPOSE -->
<LinearLayout
android:id="@+id/settings_compose"
@ -858,22 +998,13 @@
android:orientation="vertical">
<!-- EXPAND CW -->
<CheckBox
android:id="@+id/set_expand_cw"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/expand_cw"
android:layout_height="wrap_content" />
<!-- EXPAND Images -->
<CheckBox
android:id="@+id/set_expand_image"
android:id="@+id/set_hide_delete_notification_on_tab"
android:layout_width="wrap_content"
android:layout_marginTop="@dimen/settings_checkbox_margin"
android:layout_marginBottom="@dimen/settings_checkbox_margin"
android:text="@string/expand_image"
android:text="@string/set_hide_delete_notification_on_tab"
android:layout_height="wrap_content" />
</LinearLayout>
@ -887,15 +1018,7 @@
android:orientation="vertical">
<TextView
android:text="@string/settings_title_battery"
style="?attr/shapeBorder"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Spinner
android:id="@+id/battery_layout_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="@string/set_attachment_action"
android:layout_width="match_parent"

View File

@ -360,12 +360,6 @@
<string-array name="battery_profiles">
<item>Normal battery drain</item>
<item>Medium battery drain</item>
<item>Low battery drain</item>
</string-array>
<string-array name="settings_menu_tabs">
<item>Tabs</item>
<item>Menu</item>
@ -687,7 +681,6 @@
<string name="information">Information</string>
<string name="set_display_card">Display previews in all toots</string>
<string name="thanks_text_ux">New UX/UI designer</string>
<string name="set_old_direct_timeline">Use the direct timeline prior to Mastodon 2.6</string>
<string name="set_display_video_preview">Display video previews</string>
<string name="thanks_text_support">Gitlab Support</string>
<string name="action_bug_report">Bug Report</string>
@ -1086,6 +1079,15 @@
<string name="voice_message">Voice message</string>
<string name="set_quick_reply">Enable quick reply</string>
<string name="reply_might_be_useless">The account you are replying might not see your message!</string>
<string name="set_remember_position_indication">If disabled, the app will always load last statuses</string>
<string name="set_blur_sensitive_indication">If disabled, sensitive media will be hidden with a button</string>
<string name="set_long_press_media_indication">Store media in full size with a long press on previews</string>
<string name="set_display_timeline_in_list_indication">Add an ellipse button at the top right for listing all tags/instances/lists</string>
<string name="set_display_news_from_fedilab_indication">Display an item in the main menu for a quick access to the timeline targeting #Fedilab tag</string>
<string name="live_notif_indication">Keep an open connection to the streaming API for live notifications.</string>
<string name="set_keep_background_process_indication">When the app is in background, it will keep a connection to the streaming API. Disable it if you care about your battery.</string>
<string name="set_enable_time_slot_indication">During the time slot, the app will send notifications. You can reverse (ie: silent) this time slot with the right spinner.</string>
<plurals name="number_of_vote">
<item quantity="one">%d vote</item>
<item quantity="other">%d votes</item>