Some fixes when selecting tab + add hide menu item
This commit is contained in:
parent
f5409b9e69
commit
a1e9fcf224
|
@ -294,11 +294,6 @@
|
|||
android:windowSoftInputMode="stateAlwaysHidden"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name" />
|
||||
<activity
|
||||
android:name="app.fedilab.android.activities.HideItemActivity"
|
||||
android:windowSoftInputMode="stateAlwaysHidden"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name" />
|
||||
<activity
|
||||
android:name="app.fedilab.android.activities.SettingsActivity"
|
||||
android:windowSoftInputMode="stateAlwaysHidden"
|
||||
|
|
|
@ -1,155 +0,0 @@
|
|||
/* Copyright 2019 Thomas Schneider
|
||||
*
|
||||
* This file is a part of Fedilab
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
package app.fedilab.android.activities;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import app.fedilab.android.R;
|
||||
|
||||
import app.fedilab.android.client.Entities.MainMenuItem;
|
||||
import app.fedilab.android.helper.Helper;
|
||||
import app.fedilab.android.sqlite.MainMenuDAO;
|
||||
import app.fedilab.android.sqlite.Sqlite;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Thomas on 28/08/2019.
|
||||
* Hide menu items activity
|
||||
*/
|
||||
|
||||
public class HideItemActivity extends BaseActivity {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
switch (theme) {
|
||||
case Helper.THEME_LIGHT:
|
||||
setTheme(R.style.AppTheme);
|
||||
break;
|
||||
case Helper.THEME_DARK:
|
||||
setTheme(R.style.AppThemeDark);
|
||||
break;
|
||||
case Helper.THEME_BLACK:
|
||||
setTheme(R.style.AppThemeBlack);
|
||||
break;
|
||||
default:
|
||||
setTheme(R.style.AppThemeDark);
|
||||
}
|
||||
|
||||
if (getSupportActionBar() != null)
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
assert inflater != null;
|
||||
View view = inflater.inflate(R.layout.simple_bar, new LinearLayout(getApplicationContext()), false);
|
||||
actionBar.setCustomView(view, new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||
ImageView toolbar_close = actionBar.getCustomView().findViewById(R.id.toolbar_close);
|
||||
TextView toolbar_title = actionBar.getCustomView().findViewById(R.id.toolbar_title);
|
||||
toolbar_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
toolbar_title.setText(R.string.hide_menu_items);
|
||||
if (theme == Helper.THEME_LIGHT) {
|
||||
Toolbar toolbar = actionBar.getCustomView().findViewById(R.id.toolbar);
|
||||
Helper.colorizeToolbar(toolbar, R.color.black, HideItemActivity.this);
|
||||
}
|
||||
}
|
||||
setContentView(R.layout.activity_hide_menu_items);
|
||||
|
||||
SQLiteDatabase db = Sqlite.getInstance(HideItemActivity.this, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
MainMenuItem mainMenu = new MainMenuDAO(getApplicationContext(), db).getMainMenu();
|
||||
if (mainMenu == null) {
|
||||
mainMenu = new MainMenuItem();
|
||||
}
|
||||
CheckBox nav_news = findViewById(R.id.nav_news);
|
||||
CheckBox nav_list = findViewById(R.id.nav_list);
|
||||
CheckBox nav_scheduled = findViewById(R.id.nav_scheduled);
|
||||
CheckBox nav_archive = findViewById(R.id.nav_archive);
|
||||
CheckBox nav_archive_notifications = findViewById(R.id.nav_archive_notifications);
|
||||
CheckBox nav_peertube = findViewById(R.id.nav_peertube);
|
||||
CheckBox nav_filters = findViewById(R.id.nav_filters);
|
||||
CheckBox nav_who_to_follow = findViewById(R.id.nav_who_to_follow);
|
||||
CheckBox nav_blocked = findViewById(R.id.nav_blocked);
|
||||
CheckBox nav_muted = findViewById(R.id.nav_muted);
|
||||
CheckBox nav_blocked_domains = findViewById(R.id.nav_blocked_domains);
|
||||
CheckBox nav_how_to = findViewById(R.id.nav_how_to);
|
||||
Button validate = findViewById(R.id.validate);
|
||||
|
||||
|
||||
nav_news.setChecked(mainMenu.isNav_news());
|
||||
nav_list.setChecked(mainMenu.isNav_list());
|
||||
nav_scheduled.setChecked(mainMenu.isNav_scheduled());
|
||||
nav_archive.setChecked(mainMenu.isNav_archive());
|
||||
nav_archive_notifications.setChecked(mainMenu.isNav_archive_notifications());
|
||||
nav_peertube.setChecked(mainMenu.isNav_peertube());
|
||||
nav_filters.setChecked(mainMenu.isNav_filters());
|
||||
nav_who_to_follow.setChecked(mainMenu.isNav_how_to_follow());
|
||||
nav_blocked.setChecked(mainMenu.isNav_blocked());
|
||||
nav_muted.setChecked(mainMenu.isNav_muted());
|
||||
nav_blocked_domains.setChecked(mainMenu.isNav_blocked_domains());
|
||||
nav_how_to.setChecked(mainMenu.isNav_howto());
|
||||
|
||||
|
||||
validate.setOnClickListener(view -> {
|
||||
MainMenuItem mainMenuItem = new MainMenuItem();
|
||||
mainMenuItem.setNav_news(nav_news.isChecked());
|
||||
mainMenuItem.setNav_list(nav_list.isChecked());
|
||||
mainMenuItem.setNav_scheduled(nav_scheduled.isChecked());
|
||||
mainMenuItem.setNav_archive(nav_archive.isChecked());
|
||||
mainMenuItem.setNav_archive_notifications(nav_archive_notifications.isChecked());
|
||||
mainMenuItem.setNav_peertube(nav_peertube.isChecked());
|
||||
mainMenuItem.setNav_filters(nav_filters.isChecked());
|
||||
mainMenuItem.setNav_how_to_follow(nav_who_to_follow.isChecked());
|
||||
mainMenuItem.setNav_blocked(nav_blocked.isChecked());
|
||||
mainMenuItem.setNav_muted(nav_muted.isChecked());
|
||||
mainMenuItem.setNav_blocked_domains(nav_blocked_domains.isChecked());
|
||||
mainMenuItem.setNav_howto(nav_how_to.isChecked());
|
||||
MainMenuItem mainMenuItem1 = new MainMenuDAO(getApplicationContext(), db).getMainMenu();
|
||||
|
||||
if (mainMenuItem1 != null) {
|
||||
new MainMenuDAO(getApplicationContext(), db).updateMenu(mainMenuItem);
|
||||
} else {
|
||||
new MainMenuDAO(getApplicationContext(), db).insertMenu(mainMenuItem);
|
||||
}
|
||||
Intent mainActivity = new Intent(HideItemActivity.this, MainActivity.class);
|
||||
mainActivity.putExtra(Helper.INTENT_ACTION, Helper.REDRAW_MENU);
|
||||
startActivity(mainActivity);
|
||||
finish();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -125,6 +125,23 @@ public class SettingsActivity extends BaseActivity {
|
|||
}
|
||||
});
|
||||
|
||||
tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
mPager.setCurrentItem(tab.getPosition());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,11 +15,7 @@ package app.fedilab.android.fragments;
|
|||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.ContentUris;
|
||||
|
@ -30,7 +26,6 @@ import android.content.SharedPreferences;
|
|||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
@ -77,12 +72,12 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import app.fedilab.android.R;
|
||||
import app.fedilab.android.activities.LanguageActivity;
|
||||
import app.fedilab.android.activities.MainActivity;
|
||||
import app.fedilab.android.activities.SettingsActivity;
|
||||
import app.fedilab.android.asynctasks.DownloadTrackingDomainsAsyncTask;
|
||||
import app.fedilab.android.asynctasks.UpdateAccountInfoAsyncTask;
|
||||
import app.fedilab.android.client.Entities.Account;
|
||||
import app.fedilab.android.client.Entities.MainMenuItem;
|
||||
import app.fedilab.android.filelister.FileListerDialog;
|
||||
import app.fedilab.android.filelister.OnFileSelectedListener;
|
||||
import app.fedilab.android.helper.Helper;
|
||||
|
@ -90,6 +85,7 @@ import app.fedilab.android.services.LiveNotificationDelayedService;
|
|||
import app.fedilab.android.services.LiveNotificationService;
|
||||
import app.fedilab.android.services.StopLiveNotificationReceiver;
|
||||
import app.fedilab.android.sqlite.AccountDAO;
|
||||
import app.fedilab.android.sqlite.MainMenuDAO;
|
||||
import app.fedilab.android.sqlite.Sqlite;
|
||||
import es.dmoral.toasty.Toasty;
|
||||
import mabbas007.tagsedittext.TagsEditText;
|
||||
|
@ -100,15 +96,14 @@ import static android.content.Context.MODE_PRIVATE;
|
|||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.ADMIN;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.COMPOSE;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.INTERFACE;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.LANGUAGE;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.MENU;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.NOTIFICATIONS;
|
||||
import static app.fedilab.android.fragments.ContentSettingsFragment.type.TIMELINES;
|
||||
|
||||
public class ContentSettingsFragment extends Fragment {
|
||||
|
||||
|
||||
private View containerView;
|
||||
protected int res;
|
||||
private Bitmap bitmap;
|
||||
private type type;
|
||||
private Context context;
|
||||
|
||||
|
@ -145,7 +140,6 @@ public class ContentSettingsFragment extends Fragment {
|
|||
super.onViewCreated(view, savedInstanceState);
|
||||
context = getContext();
|
||||
assert context != null;
|
||||
this.containerView = view.findViewById(R.id.container);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -192,8 +186,6 @@ public class ContentSettingsFragment extends Fragment {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
assert getArguments() != null;
|
||||
res = getArguments().getInt(Integer.class.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -237,9 +229,10 @@ public class ContentSettingsFragment extends Fragment {
|
|||
LinearLayout settings_admin = rootView.findViewById(R.id.settings_admin);
|
||||
LinearLayout settings_interface = rootView.findViewById(R.id.settings_interface);
|
||||
LinearLayout settings_compose = rootView.findViewById(R.id.settings_compose);
|
||||
LinearLayout settings_hide_menu = rootView.findViewById(R.id.settings_hide_menu);
|
||||
LinearLayout settings_translation = rootView.findViewById(R.id.settings_translation);
|
||||
|
||||
|
||||
String title = "";
|
||||
if (type == null || type.equals(TIMELINES)) {
|
||||
settings_timeline.setVisibility(View.VISIBLE);
|
||||
} else if (type == NOTIFICATIONS) {
|
||||
|
@ -250,6 +243,10 @@ public class ContentSettingsFragment extends Fragment {
|
|||
settings_interface.setVisibility(View.VISIBLE);
|
||||
} else if (type == COMPOSE) {
|
||||
settings_compose.setVisibility(View.VISIBLE);
|
||||
} else if( type == MENU){
|
||||
settings_hide_menu.setVisibility(View.VISIBLE);
|
||||
}else if( type == LANGUAGE){
|
||||
settings_translation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2197,6 +2194,68 @@ public class ContentSettingsFragment extends Fragment {
|
|||
lol.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
Button validate = rootView.findViewById(R.id.validate);
|
||||
|
||||
MainMenuItem mainMenu = new MainMenuDAO(context, db).getMainMenu();
|
||||
if (mainMenu == null) {
|
||||
mainMenu = new MainMenuItem();
|
||||
}
|
||||
nav_news.setChecked(mainMenu.isNav_news());
|
||||
nav_list.setChecked(mainMenu.isNav_list());
|
||||
nav_scheduled.setChecked(mainMenu.isNav_scheduled());
|
||||
nav_archive.setChecked(mainMenu.isNav_archive());
|
||||
nav_archive_notifications.setChecked(mainMenu.isNav_archive_notifications());
|
||||
nav_peertube.setChecked(mainMenu.isNav_peertube());
|
||||
nav_filters.setChecked(mainMenu.isNav_filters());
|
||||
nav_who_to_follow.setChecked(mainMenu.isNav_how_to_follow());
|
||||
nav_blocked.setChecked(mainMenu.isNav_blocked());
|
||||
nav_muted.setChecked(mainMenu.isNav_muted());
|
||||
nav_blocked_domains.setChecked(mainMenu.isNav_blocked_domains());
|
||||
nav_how_to.setChecked(mainMenu.isNav_howto());
|
||||
|
||||
|
||||
validate.setOnClickListener(view -> {
|
||||
MainMenuItem mainMenuItem = new MainMenuItem();
|
||||
mainMenuItem.setNav_news(nav_news.isChecked());
|
||||
mainMenuItem.setNav_list(nav_list.isChecked());
|
||||
mainMenuItem.setNav_scheduled(nav_scheduled.isChecked());
|
||||
mainMenuItem.setNav_archive(nav_archive.isChecked());
|
||||
mainMenuItem.setNav_archive_notifications(nav_archive_notifications.isChecked());
|
||||
mainMenuItem.setNav_peertube(nav_peertube.isChecked());
|
||||
mainMenuItem.setNav_filters(nav_filters.isChecked());
|
||||
mainMenuItem.setNav_how_to_follow(nav_who_to_follow.isChecked());
|
||||
mainMenuItem.setNav_blocked(nav_blocked.isChecked());
|
||||
mainMenuItem.setNav_muted(nav_muted.isChecked());
|
||||
mainMenuItem.setNav_blocked_domains(nav_blocked_domains.isChecked());
|
||||
mainMenuItem.setNav_howto(nav_how_to.isChecked());
|
||||
MainMenuItem mainMenuItem1 = new MainMenuDAO(context, db).getMainMenu();
|
||||
|
||||
if (mainMenuItem1 != null) {
|
||||
new MainMenuDAO(context, db).updateMenu(mainMenuItem);
|
||||
} else {
|
||||
new MainMenuDAO(context, db).insertMenu(mainMenuItem);
|
||||
}
|
||||
Intent mainActivity = new Intent(context, MainActivity.class);
|
||||
mainActivity.putExtra(Helper.INTENT_ACTION, Helper.REDRAW_MENU);
|
||||
startActivity(mainActivity);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
||||
|
@ -2208,9 +2267,6 @@ public class ContentSettingsFragment extends Fragment {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//From: https://gist.github.com/asifmujteba/d89ba9074bc941de1eaa#file-asfurihelper
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
public static String getPath(final Context context, final Uri uri) {
|
||||
|
|
|
@ -1,198 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 Thomas Schneider
|
||||
|
||||
This file is a part of Fedilab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/activity_vertical_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<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/communication_menu_title"
|
||||
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>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_news"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/action_news"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/action_lists"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_scheduled"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/scheduled_toots"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_archive"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/owner_cached_toots"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_archive_notifications"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/owner_cached_notifications"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_peertube"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/peertube_favorites"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_filters"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/filters"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_who_to_follow"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/how_to_follow"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<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/neutral_menu_title"
|
||||
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>
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_blocked"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/blocked_menu"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_muted"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/muted_menu"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_blocked_domains"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/blocked_domains"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<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/neutral_menu_information"
|
||||
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>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_how_to"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/how_to_videos"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/validate"
|
||||
android:layout_gravity="center"
|
||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/validate" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -1762,7 +1762,6 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- COMPOSE -->
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_compose"
|
||||
|
@ -2111,6 +2110,196 @@
|
|||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- HIDE MENU -->
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_hide_menu"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<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/communication_menu_title"
|
||||
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>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_news"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/action_news"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/action_lists"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_scheduled"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/scheduled_toots"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_archive"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/owner_cached_toots"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_archive_notifications"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/owner_cached_notifications"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_peertube"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/peertube_favorites"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_filters"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/filters"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_who_to_follow"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/how_to_follow"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<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/neutral_menu_title"
|
||||
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>
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_blocked"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/blocked_menu"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_muted"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/muted_menu"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_blocked_domains"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/blocked_domains"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<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/neutral_menu_information"
|
||||
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>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/nav_how_to"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/how_to_videos"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/validate"
|
||||
android:layout_gravity="center"
|
||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/validate" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- TRANSLATION -->
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_translation"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
|
Loading…
Reference in New Issue