Merge branch 'settings_changes' into develop

This commit is contained in:
tom79 2019-09-22 19:00:32 +02:00
commit d91b1be499
2 changed files with 265 additions and 63 deletions

View File

@ -2214,18 +2214,18 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
}
}
CheckBox nav_news = rootView.findViewById(R.id.nav_news);
CheckBox nav_list = rootView.findViewById(R.id.nav_list);
CheckBox nav_scheduled = rootView.findViewById(R.id.nav_scheduled);
CheckBox nav_archive = rootView.findViewById(R.id.nav_archive);
CheckBox nav_archive_notifications = rootView.findViewById(R.id.nav_archive_notifications);
CheckBox nav_peertube = rootView.findViewById(R.id.nav_peertube);
CheckBox nav_filters = rootView.findViewById(R.id.nav_filters);
CheckBox nav_who_to_follow = rootView.findViewById(R.id.nav_who_to_follow);
CheckBox nav_blocked = rootView.findViewById(R.id.nav_blocked);
CheckBox nav_muted = rootView.findViewById(R.id.nav_muted);
CheckBox nav_blocked_domains = rootView.findViewById(R.id.nav_blocked_domains);
CheckBox nav_how_to = rootView.findViewById(R.id.nav_how_to);
SwitchCompat nav_news = rootView.findViewById(R.id.nav_news);
SwitchCompat nav_list = rootView.findViewById(R.id.nav_list);
SwitchCompat nav_scheduled = rootView.findViewById(R.id.nav_scheduled);
SwitchCompat nav_archive = rootView.findViewById(R.id.nav_archive);
SwitchCompat nav_archive_notifications = rootView.findViewById(R.id.nav_archive_notifications);
SwitchCompat nav_peertube = rootView.findViewById(R.id.nav_peertube);
SwitchCompat nav_filters = rootView.findViewById(R.id.nav_filters);
SwitchCompat nav_who_to_follow = rootView.findViewById(R.id.nav_who_to_follow);
SwitchCompat nav_blocked = rootView.findViewById(R.id.nav_blocked);
SwitchCompat nav_muted = rootView.findViewById(R.id.nav_muted);
SwitchCompat nav_blocked_domains = rootView.findViewById(R.id.nav_blocked_domains);
SwitchCompat nav_how_to = rootView.findViewById(R.id.nav_how_to);
Button validate = rootView.findViewById(R.id.validate);
MainMenuItem mainMenu = new MainMenuDAO(context, db).getMainMenu();

View File

@ -2650,56 +2650,189 @@
android:background="?colorAccent" />
</LinearLayout>
<CheckBox
android:id="@+id/nav_news"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_news" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/nav_list"
android:layout_width="wrap_content"
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/action_news"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_news"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_lists" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/action_lists"
android:textSize="16sp" />
<CheckBox
android:id="@+id/nav_scheduled"
android:layout_width="wrap_content"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scheduled_toots" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/scheduled_toots"
android:textSize="16sp" />
<CheckBox
android:id="@+id/nav_archive"
android:layout_width="wrap_content"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_scheduled"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/owner_cached_toots" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/nav_archive_notifications"
android:layout_width="wrap_content"
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/owner_cached_toots"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_archive"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/owner_cached_notifications" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/owner_cached_notifications"
android:textSize="16sp" />
<CheckBox
android:id="@+id/nav_peertube"
android:layout_width="wrap_content"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_archive_notifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/peertube_favorites" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/nav_filters"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/filters" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/peertube_favorites"
android:textSize="16sp" />
<CheckBox
android:id="@+id/nav_who_to_follow"
android:layout_width="wrap_content"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_peertube"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/how_to_follow" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/filters"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_filters"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/how_to_follow"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_who_to_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
@ -2730,24 +2863,75 @@
android:background="?colorAccent" />
</LinearLayout>
<CheckBox
android:id="@+id/nav_blocked"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/blocked_menu" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/nav_muted"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/muted_menu" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/blocked_menu"
android:textSize="16sp" />
<CheckBox
android:id="@+id/nav_blocked_domains"
android:layout_width="wrap_content"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_blocked"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/blocked_domains" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/muted_menu"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_muted"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/blocked_domains"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_blocked_domains"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -2777,11 +2961,28 @@
android:background="?colorAccent" />
</LinearLayout>
<CheckBox
android:id="@+id/nav_how_to"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/how_to_videos" />
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/how_to_videos"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/nav_how_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<Button
@ -2791,6 +2992,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/validate" />
</LinearLayout>