mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Add new tab menu item
This commit is contained in:
parent
9704a4204f
commit
1e5df45927
@ -35,7 +35,6 @@ import android.net.Uri;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.constraint.ConstraintLayout;
|
import android.support.constraint.ConstraintLayout;
|
||||||
@ -48,6 +47,7 @@ import android.support.v4.app.ActivityCompat;
|
|||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v4.view.GravityCompat;
|
import android.support.v4.view.GravityCompat;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.widget.AppCompatButton;
|
import android.support.v7.widget.AppCompatButton;
|
||||||
import android.support.v7.widget.CardView;
|
import android.support.v7.widget.CardView;
|
||||||
@ -191,7 +191,10 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
ImageView bottomToolbarArrowForward;
|
ImageView bottomToolbarArrowForward;
|
||||||
@Inject
|
@Inject
|
||||||
MainContract.Presenter presenter;
|
MainContract.Presenter presenter;
|
||||||
private ImageView addTab;
|
@BindView(R.id.tab_switcher_recycler_view)
|
||||||
|
RecyclerView tabRecyclerView;
|
||||||
|
@BindView(R.id.activity_main_tab_switcher)
|
||||||
|
View tabSwitcherRoot;
|
||||||
private CountDownTimer hideBackToTopTimer = new CountDownTimer(1200, 1200) {
|
private CountDownTimer hideBackToTopTimer = new CountDownTimer(1200, 1200) {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long millisUntilFinished) {
|
||||||
@ -227,7 +230,7 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
private boolean isFirstRun;
|
private boolean isFirstRun;
|
||||||
private BooksAdapter booksAdapter;
|
private BooksAdapter booksAdapter;
|
||||||
private AppCompatButton downloadBookButton;
|
private AppCompatButton downloadBookButton;
|
||||||
private View tabSwitcherRoot;
|
private ActionBar actionBar;
|
||||||
private TextView tabSwitcherIcon;
|
private TextView tabSwitcherIcon;
|
||||||
private ItemTouchHelper.Callback tabCallback = new ItemTouchHelper.Callback() {
|
private ItemTouchHelper.Callback tabCallback = new ItemTouchHelper.Callback() {
|
||||||
@Override
|
@Override
|
||||||
@ -316,6 +319,7 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
handleLocaleCheck();
|
handleLocaleCheck();
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
actionBar = getSupportActionBar();
|
||||||
RecyclerView tableDrawerRight = tableDrawerRightContainer.getHeaderView(0).findViewById(R.id.right_drawer_list);
|
RecyclerView tableDrawerRight = tableDrawerRightContainer.getHeaderView(0).findViewById(R.id.right_drawer_list);
|
||||||
checkForRateDialog();
|
checkForRateDialog();
|
||||||
|
|
||||||
@ -326,6 +330,13 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
documentParserJs = fileReader.readFile("js/documentParser.js", this);
|
documentParserJs = fileReader.readFile("js/documentParser.js", this);
|
||||||
documentSections = new ArrayList<>();
|
documentSections = new ArrayList<>();
|
||||||
tabsAdapter = new TabsAdapter(this, webViewList);
|
tabsAdapter = new TabsAdapter(this, webViewList);
|
||||||
|
tabsAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
|
||||||
|
@Override
|
||||||
|
public void onChanged() {
|
||||||
|
updateTabSwitcherIcon();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
tableDrawerRight.setLayoutManager(new LinearLayoutManager(this));
|
tableDrawerRight.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
|
||||||
TableDrawerAdapter tableDrawerAdapter = new TableDrawerAdapter();
|
TableDrawerAdapter tableDrawerAdapter = new TableDrawerAdapter();
|
||||||
@ -421,22 +432,33 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
booksAdapter = new BooksAdapter(books, this);
|
booksAdapter = new BooksAdapter(books, this);
|
||||||
|
|
||||||
searchFiles();
|
searchFiles();
|
||||||
|
|
||||||
tabSwitcherRoot = getLayoutInflater().inflate(R.layout.tab_switcher, drawerLayout, false);
|
|
||||||
RecyclerView tabRecyclerView = tabSwitcherRoot.findViewById(R.id.tab_switcher_recycler_view);
|
|
||||||
addTab = tabSwitcherRoot.findViewById(R.id.tab_switcher_add_tab);
|
|
||||||
addTab.setOnClickListener(v -> {
|
|
||||||
hideTabSwitcher();
|
|
||||||
newTab(HOME_URL);
|
|
||||||
});
|
|
||||||
tabRecyclerView.setAdapter(tabsAdapter);
|
tabRecyclerView.setAdapter(tabsAdapter);
|
||||||
new ItemTouchHelper(tabCallback).attachToRecyclerView(tabRecyclerView);
|
new ItemTouchHelper(tabCallback).attachToRecyclerView(tabRecyclerView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showTabSwitcher() {
|
||||||
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
actionBar.setHomeAsUpIndicator(ContextCompat.getDrawable(this, R.drawable.ic_round_add_white_36dp));
|
||||||
|
actionBar.setDisplayShowTitleEnabled(false);
|
||||||
|
|
||||||
|
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||||
|
bottomToolbar.setVisibility(View.GONE);
|
||||||
|
contentFrame.setVisibility(View.GONE);
|
||||||
|
progressBar.setVisibility(View.GONE);
|
||||||
|
backToTopButton.hide();
|
||||||
|
tabSwitcherRoot.setVisibility(View.VISIBLE);
|
||||||
|
supportInvalidateOptionsMenu();
|
||||||
|
}
|
||||||
|
|
||||||
private void hideTabSwitcher() {
|
private void hideTabSwitcher() {
|
||||||
drawerLayout.removeAllViews();
|
actionBar.setDisplayHomeAsUpEnabled(false);
|
||||||
drawerLayout.addView(root);
|
actionBar.setDisplayShowTitleEnabled(true);
|
||||||
drawerLayout.addView(tableDrawerRightContainer);
|
|
||||||
|
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
||||||
|
tabSwitcherRoot.setVisibility(View.GONE);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
contentFrame.setVisibility(View.VISIBLE);
|
||||||
|
supportInvalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick(R.id.bottom_toolbar_arrow_back)
|
@OnClick(R.id.bottom_toolbar_arrow_back)
|
||||||
@ -466,11 +488,6 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showTabSwitcher() {
|
|
||||||
drawerLayout.removeAllViews();
|
|
||||||
drawerLayout.addView(tabSwitcherRoot);
|
|
||||||
}
|
|
||||||
|
|
||||||
@OnClick(R.id.bottom_toolbar_toc)
|
@OnClick(R.id.bottom_toolbar_toc)
|
||||||
void openToc() {
|
void openToc() {
|
||||||
drawerLayout.openDrawer(GravityCompat.END);
|
drawerLayout.openDrawer(GravityCompat.END);
|
||||||
@ -553,12 +570,10 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
if (zimFileTitle == null) {
|
if (zimFileTitle == null) {
|
||||||
zimFileTitle = getString(R.string.app_name);
|
zimFileTitle = getString(R.string.app_name);
|
||||||
}
|
}
|
||||||
if (getSupportActionBar() != null) {
|
|
||||||
if (zimFileTitle.trim().isEmpty() || HOME_URL.equals(getCurrentWebView().getUrl())) {
|
if (zimFileTitle.trim().isEmpty() || HOME_URL.equals(getCurrentWebView().getUrl())) {
|
||||||
getSupportActionBar().setTitle(createMenuText(getString(R.string.app_name)));
|
actionBar.setTitle(createMenuText(getString(R.string.app_name)));
|
||||||
} else {
|
} else {
|
||||||
getSupportActionBar().setTitle(createMenuText(zimFileTitle));
|
actionBar.setTitle(createMenuText(zimFileTitle));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -638,8 +653,6 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
tabCallback = null;
|
tabCallback = null;
|
||||||
downloadBookButton = null;
|
downloadBookButton = null;
|
||||||
addTab.setOnClickListener(null);
|
|
||||||
addTab = null;
|
|
||||||
hideBackToTopTimer.cancel();
|
hideBackToTopTimer.cancel();
|
||||||
hideBackToTopTimer = null;
|
hideBackToTopTimer = null;
|
||||||
fileSearch = null;
|
fileSearch = null;
|
||||||
@ -699,8 +712,10 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
webViewList.add(index, tempForUndo);
|
webViewList.add(index, tempForUndo);
|
||||||
tabsAdapter.notifyItemInserted(index);
|
tabsAdapter.notifyItemInserted(index);
|
||||||
setUpWebView();
|
setUpWebView();
|
||||||
|
updateTabSwitcherIcon();
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
|
updateTabSwitcherIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectTab(int position) {
|
private void selectTab(int position) {
|
||||||
@ -715,13 +730,10 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
contentFrame.addView(webView);
|
contentFrame.addView(webView);
|
||||||
tabsAdapter.setSelected(currentWebViewIndex);
|
tabsAdapter.setSelected(currentWebViewIndex);
|
||||||
updateBottomToolbarVisibility();
|
updateBottomToolbarVisibility();
|
||||||
|
|
||||||
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
|
|
||||||
new Handler().postDelayed(() -> drawerLayout.closeDrawers(), 150);
|
|
||||||
}
|
|
||||||
loadPrefs();
|
loadPrefs();
|
||||||
refreshBookmarkSymbol();
|
refreshBookmarkSymbol();
|
||||||
updateTableOfContents();
|
updateTableOfContents();
|
||||||
|
updateTitle();
|
||||||
|
|
||||||
if (!isHideToolbar && webView instanceof ToolbarScrollingKiwixWebView) {
|
if (!isHideToolbar && webView instanceof ToolbarScrollingKiwixWebView) {
|
||||||
((ToolbarScrollingKiwixWebView) webView).ensureToolbarDisplayed();
|
((ToolbarScrollingKiwixWebView) webView).ensureToolbarDisplayed();
|
||||||
@ -742,9 +754,15 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
|
|
||||||
KiwixWebView webView = getCurrentWebView();
|
KiwixWebView webView = getCurrentWebView();
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case R.id.menu_new_tab:
|
||||||
|
case android.R.id.home:
|
||||||
|
if (tabSwitcherRoot.getVisibility() == View.VISIBLE) {
|
||||||
|
hideTabSwitcher();
|
||||||
|
}
|
||||||
|
newTab(HOME_URL);
|
||||||
|
return true;
|
||||||
|
|
||||||
case R.id.menu_home:
|
case R.id.menu_home:
|
||||||
case android.R.id.home:
|
|
||||||
openMainPage();
|
openMainPage();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -838,12 +856,7 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
@OnClick(R.id.activity_main_fullscreen_button)
|
@OnClick(R.id.activity_main_fullscreen_button)
|
||||||
void closeFullScreen() {
|
void closeFullScreen() {
|
||||||
toolbarContainer.setVisibility(View.VISIBLE);
|
toolbarContainer.setVisibility(View.VISIBLE);
|
||||||
if (sharedPreferenceUtil.getPrefBottomToolbar()) {
|
updateBottomToolbarVisibility();
|
||||||
bottomToolbar.setVisibility(View.VISIBLE);
|
|
||||||
if (getCurrentWebView() instanceof ToolbarStaticKiwixWebView) {
|
|
||||||
contentFrame.setPadding(0, 0, 0, (int) getResources().getDimension(R.dimen.bottom_toolbar_height));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exitFullscreenButton.setVisibility(View.GONE);
|
exitFullscreenButton.setVisibility(View.GONE);
|
||||||
|
|
||||||
int fullScreenFlag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
|
int fullScreenFlag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
|
||||||
@ -862,9 +875,6 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
public void showHomePage() {
|
public void showHomePage() {
|
||||||
getCurrentWebView().removeAllViews();
|
getCurrentWebView().removeAllViews();
|
||||||
getCurrentWebView().loadUrl(HOME_URL);
|
getCurrentWebView().loadUrl(HOME_URL);
|
||||||
if (getSupportActionBar() != null) {
|
|
||||||
getSupportActionBar().setTitle(createMenuText(getString(R.string.app_name)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1188,7 +1198,8 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateBottomToolbarVisibility() {
|
private void updateBottomToolbarVisibility() {
|
||||||
if (sharedPreferenceUtil.getPrefBottomToolbar() && !HOME_URL.equals(getCurrentWebView().getUrl())) {
|
if (sharedPreferenceUtil.getPrefBottomToolbar() && !HOME_URL.equals(getCurrentWebView().getUrl())
|
||||||
|
&& tabSwitcherRoot.getVisibility() != View.VISIBLE) {
|
||||||
bottomToolbar.setVisibility(View.VISIBLE);
|
bottomToolbar.setVisibility(View.VISIBLE);
|
||||||
if (getCurrentWebView() instanceof ToolbarStaticKiwixWebView && sharedPreferenceUtil.getPrefBottomToolbar()) {
|
if (getCurrentWebView() instanceof ToolbarStaticKiwixWebView && sharedPreferenceUtil.getPrefBottomToolbar()) {
|
||||||
contentFrame.setPadding(0, 0, 0, (int) getResources().getDimension(R.dimen.bottom_toolbar_height));
|
contentFrame.setPadding(0, 0, 0, (int) getResources().getDimension(R.dimen.bottom_toolbar_height));
|
||||||
@ -1315,7 +1326,7 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
hideTabSwitcher();
|
||||||
Log.i(TAG_KIWIX, "Intent data: " + data);
|
Log.i(TAG_KIWIX, "Intent data: " + data);
|
||||||
|
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
@ -1415,15 +1426,12 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
if (isFullscreenOpened) {
|
if (isFullscreenOpened) {
|
||||||
openFullScreen();
|
openFullScreen();
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
View tabSwitcher = menu.findItem(R.id.menu_tab_switcher).getActionView();
|
||||||
public boolean onMenuOpened(int featureId, Menu menu) {
|
tabSwitcherIcon = tabSwitcher.findViewById(R.id.ic_tab_switcher_text);
|
||||||
if (drawerLayout.isDrawerOpen(tableDrawerRightContainer)) {
|
updateTabSwitcherIcon();
|
||||||
drawerLayout.closeDrawer(tableDrawerRightContainer);
|
tabSwitcher.setOnClickListener(v -> showTabSwitcher());
|
||||||
}
|
return true;
|
||||||
return super.onMenuOpened(featureId, menu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method refreshes the menu for the bookmark system.
|
// This method refreshes the menu for the bookmark system.
|
||||||
@ -1440,26 +1448,42 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
} else {
|
} else {
|
||||||
menu.findItem(R.id.menu_read_aloud).setVisible(true);
|
menu.findItem(R.id.menu_read_aloud).setVisible(true);
|
||||||
}
|
}
|
||||||
View tabSwitcher = menu.findItem(R.id.menu_tab_switcher).getActionView();
|
|
||||||
tabSwitcherIcon = tabSwitcher.findViewById(R.id.ic_tab_switcher_text);
|
if (tabSwitcherRoot.getVisibility() == View.VISIBLE) {
|
||||||
updateTabSwitcherIcon();
|
menu.findItem(R.id.menu_search).setVisible(false);
|
||||||
tabSwitcher.setOnClickListener(v -> showTabSwitcher());
|
menu.findItem(R.id.menu_fullscreen).setVisible(false);
|
||||||
tabsAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
|
menu.findItem(R.id.menu_home).setVisible(false);
|
||||||
@Override
|
menu.findItem(R.id.menu_random_article).setVisible(false);
|
||||||
public void onChanged() {
|
menu.findItem(R.id.menu_searchintext).setVisible(false);
|
||||||
updateTabSwitcherIcon();
|
menu.findItem(R.id.menu_read_aloud).setVisible(false);
|
||||||
|
} else {
|
||||||
|
menu.findItem(R.id.menu_search).setVisible(true);
|
||||||
|
menu.findItem(R.id.menu_fullscreen).setVisible(true);
|
||||||
|
if (getCurrentWebView().getUrl() == null ||
|
||||||
|
getCurrentWebView().getUrl().equals(HOME_URL)) {
|
||||||
|
menu.findItem(R.id.menu_read_aloud).setVisible(false);
|
||||||
|
menu.findItem(R.id.menu_home).setVisible(false);
|
||||||
|
menu.findItem(R.id.menu_random_article).setVisible(false);
|
||||||
|
menu.findItem(R.id.menu_searchintext).setVisible(false);
|
||||||
|
} else {
|
||||||
|
menu.findItem(R.id.menu_read_aloud).setVisible(true);
|
||||||
|
menu.findItem(R.id.menu_home).setVisible(true);
|
||||||
|
menu.findItem(R.id.menu_random_article).setVisible(true);
|
||||||
|
menu.findItem(R.id.menu_searchintext).setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTabSwitcherIcon() {
|
private void updateTabSwitcherIcon() {
|
||||||
|
if (tabSwitcherIcon != null) {
|
||||||
if (webViewList.size() < 100) {
|
if (webViewList.size() < 100) {
|
||||||
tabSwitcherIcon.setText(String.valueOf(webViewList.size()));
|
tabSwitcherIcon.setText(String.valueOf(webViewList.size()));
|
||||||
} else {
|
} else {
|
||||||
tabSwitcherIcon.setText(getString(R.string.smiling_face));
|
tabSwitcherIcon.setText(getString(R.string.smiling_face));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void refreshBookmarkSymbol() {
|
private void refreshBookmarkSymbol() {
|
||||||
if (getCurrentWebView().getUrl() != null &&
|
if (getCurrentWebView().getUrl() != null &&
|
||||||
|
29
app/src/main/res/drawable/ic_round_add_white_36dp.xml
Normal file
29
app/src/main/res/drawable/ic_round_add_white_36dp.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (c) 2018 Kiwix <android.kiwix.org>
|
||||||
|
~
|
||||||
|
~ 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
|
||||||
|
~ any later version.
|
||||||
|
~
|
||||||
|
~ This program 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 this program; if not, write to the Free Software
|
||||||
|
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
~ MA 02110-1301, USA.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="36dp"
|
||||||
|
android:height="36dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0"
|
||||||
|
android:viewportWidth="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M18,13h-5v5c0,0.55 -0.45,1 -1,1h0c-0.55,0 -1,-0.45 -1,-1v-5H6c-0.55,0 -1,-0.45 -1,-1v0c0,-0.55 0.45,-1 1,-1h5V6c0,-0.55 0.45,-1 1,-1h0c0.55,0 1,0.45 1,1v5h5c0.55,0 1,0.45 1,1v0C19,12.55 18.55,13 18,13z" />
|
||||||
|
</vector>
|
@ -83,6 +83,7 @@
|
|||||||
android:text="@string/tts_pause"
|
android:text="@string/tts_pause"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottom_toolbar"
|
app:layout_constraintBottom_toTopOf="@id/bottom_toolbar"
|
||||||
app:layout_constraintEnd_toStartOf="@id/activity_main_button_stop_tts"
|
app:layout_constraintEnd_toStartOf="@id/activity_main_button_stop_tts"
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
@ -97,6 +98,7 @@
|
|||||||
android:text="@string/tts_stop"
|
android:text="@string/tts_stop"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottom_toolbar"
|
app:layout_constraintBottom_toTopOf="@id/bottom_toolbar"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/activity_main_button_pause_tts" />
|
app:layout_constraintStart_toEndOf="@id/activity_main_button_pause_tts" />
|
||||||
@ -110,6 +112,11 @@
|
|||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<include layout="@layout/bottom_toolbar" />
|
<include layout="@layout/bottom_toolbar" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/activity_main_tab_switcher"
|
||||||
|
layout="@layout/tab_switcher"
|
||||||
|
android:visibility="gone" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
<android.support.design.widget.NavigationView
|
<android.support.design.widget.NavigationView
|
||||||
|
@ -12,15 +12,4 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/tab_switcher_add_tab"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_margin="@dimen/activity_horizontal_margin"
|
|
||||||
android:contentDescription="@string/new_tab"
|
|
||||||
android:tint="@color/white"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_add_blue_24dp" />
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
@ -14,6 +14,11 @@
|
|||||||
app:actionLayout="@layout/ic_tab_switcher"
|
app:actionLayout="@layout/ic_tab_switcher"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_new_tab"
|
||||||
|
android:title="@string/new_tab"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_bookmarks_list"
|
android:id="@+id/menu_bookmarks_list"
|
||||||
android:title="@string/menu_bookmarks_list"
|
android:title="@string/menu_bookmarks_list"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user