Quick access to pinned TL

This commit is contained in:
tom79 2019-05-19 14:33:24 +02:00
parent 3fc4c2d5a3
commit 9d7d1841b2
10 changed files with 187 additions and 3 deletions

View File

@ -51,6 +51,7 @@ import android.support.v7.widget.Toolbar;
import android.util.Patterns; import android.util.Patterns;
import android.view.Gravity; import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -63,6 +64,7 @@ import android.widget.SeekBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
@ -101,6 +103,7 @@ import app.fedilab.android.helper.MenuFloating;
import app.fedilab.android.services.BackupStatusService; import app.fedilab.android.services.BackupStatusService;
import app.fedilab.android.services.LiveNotificationService; import app.fedilab.android.services.LiveNotificationService;
import app.fedilab.android.sqlite.AccountDAO; import app.fedilab.android.sqlite.AccountDAO;
import app.fedilab.android.sqlite.InstancesDAO;
import app.fedilab.android.sqlite.Sqlite; import app.fedilab.android.sqlite.Sqlite;
import app.fedilab.android.sqlite.TimelinesDAO; import app.fedilab.android.sqlite.TimelinesDAO;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
@ -149,7 +152,7 @@ public abstract class BaseMainActivity extends BaseActivity
private String userId; private String userId;
private String instance; private String instance;
private PagerAdapter adapter; private PagerAdapter adapter;
private ImageView delete_instance; private ImageView delete_instance, display_timeline;
public static String displayPeertube = null; public static String displayPeertube = null;
private int style; private int style;
private Activity activity; private Activity activity;
@ -253,6 +256,7 @@ public abstract class BaseMainActivity extends BaseActivity
toolbarTitle = toolbar.findViewById(R.id.toolbar_title); toolbarTitle = toolbar.findViewById(R.id.toolbar_title);
toolbar_search = toolbar.findViewById(R.id.toolbar_search); toolbar_search = toolbar.findViewById(R.id.toolbar_search);
delete_instance = findViewById(R.id.delete_instance); delete_instance = findViewById(R.id.delete_instance);
display_timeline = findViewById(R.id.display_timeline);
if( theme == Helper.THEME_LIGHT) { if( theme == Helper.THEME_LIGHT) {
ImageView icon = toolbar_search.findViewById(android.support.v7.appcompat.R.id.search_button); ImageView icon = toolbar_search.findViewById(android.support.v7.appcompat.R.id.search_button);
ImageView close = toolbar_search.findViewById(android.support.v7.appcompat.R.id.search_close_btn); ImageView close = toolbar_search.findViewById(android.support.v7.appcompat.R.id.search_close_btn);
@ -264,12 +268,80 @@ public abstract class BaseMainActivity extends BaseActivity
editText.setHintTextColor(getResources().getColor(R.color.dark_icon)); editText.setHintTextColor(getResources().getColor(R.color.dark_icon));
editText.setTextColor(getResources().getColor(R.color.dark_icon)); editText.setTextColor(getResources().getColor(R.color.dark_icon));
changeDrawableColor(BaseMainActivity.this,delete_instance, R.color.dark_icon); changeDrawableColor(BaseMainActivity.this,delete_instance, R.color.dark_icon);
changeDrawableColor(BaseMainActivity.this,display_timeline, R.color.dark_icon);
} }
tabLayout = findViewById(R.id.tabLayout); tabLayout = findViewById(R.id.tabLayout);
viewPager = findViewById(R.id.viewpager); viewPager = findViewById(R.id.viewpager);
display_timeline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if( timelines == null || timelines.size() <= 0 ){
return;
}
PopupMenu popup = new PopupMenu(BaseMainActivity.this, display_timeline);
try {
@SuppressLint("PrivateApi") Method method = popup.getMenu().getClass().getDeclaredMethod("setOptionalIconsVisible", boolean.class);
method.setAccessible(true);
method.invoke(popup.getMenu(), true);
} catch (Exception e) {
e.printStackTrace();
}
int i = 0;
for (ManageTimelines tl : timelines) {
MenuItem item = null;
switch (tl.getType()){
case LIST:
item = popup.getMenu().add(0, 0, Menu.NONE, tl.getListTimeline().getTitle());
item.setIcon(R.drawable.ic_list_top_menu);
break;
case TAG:
String name = (tl.getTagTimeline().getDisplayname()!= null && tl.getTagTimeline().getDisplayname().length() > 0)?tl.getTagTimeline().getDisplayname():tl.getTagTimeline().getName();
item = popup.getMenu().add(0, 0, Menu.NONE, name);
item.setIcon(R.drawable.ic_label_top_menu);
break;
case INSTANCE:
item = popup.getMenu().add(0, 0, Menu.NONE, tl.getRemoteInstance().getHost());
switch (tl.getRemoteInstance().getType()) {
case "MASTODON":
item.setIcon(R.drawable.mastodon_icon_item);
break;
case "PEERTUBE":
item.setIcon(R.drawable.peertube_icon);
break;
case "GNU":
item.setIcon(R.drawable.ic_gnu_social);
break;
case "MISSKEY":
item.setIcon(R.drawable.misskey);
break;
case "PIXELFED":
item.setIcon(R.drawable.pixelfed);
break;
}
break;
}
if( item != null){
int finalI = i;
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if( finalI < tabLayout.getTabCount() && tabLayout.getTabAt(finalI) != null) {
tabLayout.getTabAt(finalI).select();
}
return false;
}
});
}
i++;
}
popup.show();
}
});
final NavigationView navigationView = findViewById(R.id.nav_view); final NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this); navigationView.setNavigationItemSelectedListener(this);
Helper.hideMenuItem(navigationView.getMenu()); Helper.hideMenuItem(navigationView.getMenu());
@ -370,6 +442,7 @@ public abstract class BaseMainActivity extends BaseActivity
viewPager.setCurrentItem(tab.getPosition()); viewPager.setCurrentItem(tab.getPosition());
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
Helper.switchLayout(BaseMainActivity.this); Helper.switchLayout(BaseMainActivity.this);
tootShow(); tootShow();
@ -500,6 +573,7 @@ public abstract class BaseMainActivity extends BaseActivity
viewPager.setCurrentItem(tab.getPosition()); viewPager.setCurrentItem(tab.getPosition());
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
Helper.switchLayout(BaseMainActivity.this); Helper.switchLayout(BaseMainActivity.this);
tootShow(); tootShow();
@ -625,6 +699,7 @@ public abstract class BaseMainActivity extends BaseActivity
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
delete_instance.setVisibility(View.VISIBLE); delete_instance.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
} }
}else{ }else{
@ -657,12 +732,14 @@ public abstract class BaseMainActivity extends BaseActivity
if( main_app_container.getVisibility() == View.VISIBLE){ if( main_app_container.getVisibility() == View.VISIBLE){
main_app_container.setVisibility(View.VISIBLE); main_app_container.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
}else { }else {
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
tabLayout.setVisibility(View.VISIBLE); tabLayout.setVisibility(View.VISIBLE);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
@ -683,11 +760,13 @@ public abstract class BaseMainActivity extends BaseActivity
if( main_app_container.getVisibility() == View.VISIBLE){ if( main_app_container.getVisibility() == View.VISIBLE){
main_app_container.setVisibility(View.VISIBLE); main_app_container.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
}else { }else {
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
tabLayout.setVisibility(View.VISIBLE); tabLayout.setVisibility(View.VISIBLE);
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
} }
@ -703,17 +782,20 @@ public abstract class BaseMainActivity extends BaseActivity
if( main_app_container.getVisibility() == View.VISIBLE){ if( main_app_container.getVisibility() == View.VISIBLE){
main_app_container.setVisibility(View.VISIBLE); main_app_container.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
}else { }else {
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
tabLayout.setVisibility(View.VISIBLE); tabLayout.setVisibility(View.VISIBLE);
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
} }
}else { }else {
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
manageTimelineList(false);
} }
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
} }
@ -982,11 +1064,13 @@ public abstract class BaseMainActivity extends BaseActivity
if( main_app_container.getVisibility() == View.VISIBLE){ if( main_app_container.getVisibility() == View.VISIBLE){
main_app_container.setVisibility(View.VISIBLE); main_app_container.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
}else { }else {
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
tabLayout.setVisibility(View.VISIBLE); tabLayout.setVisibility(View.VISIBLE);
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
} }
@ -1053,7 +1137,19 @@ public abstract class BaseMainActivity extends BaseActivity
} }
} }
private void manageTimelineList(boolean displayed){
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
boolean display_timeline_in_list = sharedpreferences.getBoolean(Helper.SET_DISPLAY_TIMELINE_IN_LIST, false);
if( !display_timeline_in_list){
display_timeline.setVisibility(View.GONE);
}else{
if( displayed){
display_timeline.setVisibility(View.VISIBLE);
}else{
display_timeline.setVisibility(View.GONE);
}
}
}
protected abstract void rateThisApp(); protected abstract void rateThisApp();
@ -1124,6 +1220,7 @@ public abstract class BaseMainActivity extends BaseActivity
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
delete_instance.setVisibility(View.VISIBLE); delete_instance.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setText(instance); toolbarTitle.setText(instance);
}else if( extras.getInt(Helper.INTENT_ACTION) == Helper.HOME_TIMELINE_INTENT){ }else if( extras.getInt(Helper.INTENT_ACTION) == Helper.HOME_TIMELINE_INTENT){
@ -1277,6 +1374,7 @@ public abstract class BaseMainActivity extends BaseActivity
Helper.switchLayout(BaseMainActivity.this); Helper.switchLayout(BaseMainActivity.this);
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
tabLayout.setVisibility(View.VISIBLE); tabLayout.setVisibility(View.VISIBLE);
toolbarTitle.setVisibility(View.GONE); toolbarTitle.setVisibility(View.GONE);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
@ -1408,6 +1506,7 @@ public abstract class BaseMainActivity extends BaseActivity
main_app_container.setVisibility(View.VISIBLE); main_app_container.setVisibility(View.VISIBLE);
viewPager.setVisibility(View.GONE); viewPager.setVisibility(View.GONE);
manageTimelineList(false);
tabLayout.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE);
toolbarTitle.setVisibility(View.VISIBLE); toolbarTitle.setVisibility(View.VISIBLE);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
@ -1670,7 +1769,13 @@ public abstract class BaseMainActivity extends BaseActivity
} }
public void displayTimelineMoreButton(boolean displayed){
if( displayed ){
display_timeline.setVisibility(View.VISIBLE);
}else {
display_timeline.setVisibility(View.GONE);
}
}
@Override @Override
public void syncedTimelines(List<ManageTimelines> manageTimelines, int position) { public void syncedTimelines(List<ManageTimelines> manageTimelines, int position) {
@ -1680,6 +1785,7 @@ public abstract class BaseMainActivity extends BaseActivity
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
final NavigationView navigationView = findViewById(R.id.nav_view); final NavigationView navigationView = findViewById(R.id.nav_view);
timelines = manageTimelines; timelines = manageTimelines;
if( position >= manageTimelines.size()){ if( position >= manageTimelines.size()){
position = manageTimelines.size()-1; position = manageTimelines.size()-1;
@ -1700,11 +1806,16 @@ public abstract class BaseMainActivity extends BaseActivity
iconOnly = false; iconOnly = false;
} }
} }
if( iconOnly && timelines.size() < 5){ if( iconOnly && timelines.size() < 5){
tabLayout.setTabMode(TabLayout.MODE_FIXED); tabLayout.setTabMode(TabLayout.MODE_FIXED);
}else{ }else{
tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE); tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
} }
boolean display_timeline_in_list = sharedpreferences.getBoolean(Helper.SET_DISPLAY_TIMELINE_IN_LIST, false);
displayTimelineMoreButton(display_timeline_in_list);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
viewPager.setAdapter(adapter); viewPager.setAdapter(adapter);
@ -1715,6 +1826,7 @@ public abstract class BaseMainActivity extends BaseActivity
viewPager.setCurrentItem(tab.getPosition()); viewPager.setCurrentItem(tab.getPosition());
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
Helper.switchLayout(BaseMainActivity.this); Helper.switchLayout(BaseMainActivity.this);
if( manageTimelines.size() > tab.getPosition() && (manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.NOTIFICATION ||manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.ART || manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.PEERTUBE)) { if( manageTimelines.size() > tab.getPosition() && (manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.NOTIFICATION ||manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.ART || manageTimelines.get(tab.getPosition()).getType() == ManageTimelines.Type.PEERTUBE)) {
@ -1762,6 +1874,7 @@ public abstract class BaseMainActivity extends BaseActivity
public void onTabReselected(TabLayout.Tab tab) { public void onTabReselected(TabLayout.Tab tab) {
if( viewPager.getVisibility() == View.GONE){ if( viewPager.getVisibility() == View.GONE){
viewPager.setVisibility(View.VISIBLE); viewPager.setVisibility(View.VISIBLE);
manageTimelineList(true);
delete_instance.setVisibility(View.GONE); delete_instance.setVisibility(View.GONE);
Helper.switchLayout(BaseMainActivity.this); Helper.switchLayout(BaseMainActivity.this);
main_app_container.setVisibility(View.GONE); main_app_container.setVisibility(View.GONE);

View File

@ -530,6 +530,20 @@ public class SettingsFragment extends Fragment {
}); });
boolean display_timeline_in_list = sharedpreferences.getBoolean(Helper.SET_DISPLAY_TIMELINE_IN_LIST, false);
final CheckBox set_display_timeline_in_list = rootView.findViewById(R.id.set_display_timeline_in_list);
set_display_timeline_in_list.setChecked(display_timeline_in_list);
set_display_timeline_in_list.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_DISPLAY_TIMELINE_IN_LIST, set_display_timeline_in_list.isChecked());
editor.apply();
((MainActivity) context).displayTimelineMoreButton(set_display_timeline_in_list.isChecked());
}
});
int truncate_toots_size = sharedpreferences.getInt(Helper.SET_TRUNCATE_TOOTS_SIZE, 0); int truncate_toots_size = sharedpreferences.getInt(Helper.SET_TRUNCATE_TOOTS_SIZE, 0);
SeekBar set_truncate_size = rootView.findViewById(R.id.set_truncate_size); SeekBar set_truncate_size = rootView.findViewById(R.id.set_truncate_size);

View File

@ -326,6 +326,8 @@ public class Helper {
public static final String SET_RETRIEVE_METADATA_IF_URL_FROM_EXTERAL = "set_retrieve_metadata_share_from_extras"; public static final String SET_RETRIEVE_METADATA_IF_URL_FROM_EXTERAL = "set_retrieve_metadata_share_from_extras";
public static final String SET_BLUR_SENSITIVE = "set_blur_sensitive"; public static final String SET_BLUR_SENSITIVE = "set_blur_sensitive";
public static final String SET_LONG_PRESS_MEDIA = "set_long_press_media"; public static final String SET_LONG_PRESS_MEDIA = "set_long_press_media";
public static final String SET_DISPLAY_TIMELINE_IN_LIST = "set_display_timeline_in_list";
public static final int S_NO = 0; public static final int S_NO = 0;
static final int S_512KO = 1; static final int S_512KO = 1;
public static final int S_1MO = 2; public static final int S_1MO = 2;

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#606984"
android:pathData="M17.63,5.84C17.27,5.33 16.67,5 16,5L5,5.01C3.9,5.01 3,5.9 3,7v10c0,1.1 0.9,1.99 2,1.99L16,19c0.67,0 1.27,-0.33 1.63,-0.84L22,12l-4.37,-6.16z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#606984"
android:pathData="M3,13h2v-2L3,11v2zM3,17h2v-2L3,15v2zM3,9h2L5,7L3,7v2zM7,13h14v-2L7,11v2zM7,17h14v-2L7,15v2zM7,7v2h14L21,7L7,7z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
</vector>

View File

@ -131,6 +131,14 @@
android:text="@string/set_long_press_media" android:text="@string/set_long_press_media"
android:layout_height="wrap_content" /> 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" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -82,6 +82,16 @@
android:contentDescription="@string/delete_instance" android:contentDescription="@string/delete_instance"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<ImageView
android:layout_marginLeft="5dp"
android:layout_gravity="center_vertical"
android:visibility="gone"
android:id="@+id/display_timeline"
android:src="@drawable/ic_more_horiz_black"
android:contentDescription="@string/display_timeline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp" />
<android.support.v7.widget.SearchView <android.support.v7.widget.SearchView
android:background="@null" android:background="@null"
android:id="@+id/toolbar_search" android:id="@+id/toolbar_search"

View File

@ -134,6 +134,14 @@
android:text="@string/set_long_press_media" android:text="@string/set_long_press_media"
android:layout_height="wrap_content" /> 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" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -944,6 +944,8 @@
<string name="set_forward_tags">Forward tags in replies</string> <string name="set_forward_tags">Forward tags in replies</string>
<string name="set_long_press_media">Long press to store media</string> <string name="set_long_press_media">Long press to store media</string>
<string name="set_blur_sensitive">Blur sensitive media</string> <string name="set_blur_sensitive">Blur sensitive media</string>
<string name="set_display_timeline_in_list">Display timelines in a list</string>
<string name="display_timeline">Display timelines</string>
<plurals name="number_of_vote"> <plurals name="number_of_vote">
<item quantity="one">%d vote</item> <item quantity="one">%d vote</item>