mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Add close all tabs button
This commit is contained in:
parent
ee77d61518
commit
86e62ea7ca
@ -1079,6 +1079,13 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.tab_switcher_close_all_tabs)
|
||||||
|
void closeAllTabs() {
|
||||||
|
webViewList.clear();
|
||||||
|
tabsAdapter.notifyDataSetChanged();
|
||||||
|
updateTabSwitcherIcon();
|
||||||
|
}
|
||||||
|
|
||||||
@OnClick(R.id.bottom_toolbar_bookmark)
|
@OnClick(R.id.bottom_toolbar_bookmark)
|
||||||
public void toggleBookmark() {
|
public void toggleBookmark() {
|
||||||
//Check maybe need refresh
|
//Check maybe need refresh
|
||||||
|
@ -12,4 +12,16 @@
|
|||||||
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" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/tab_switcher_close_all_tabs"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:contentDescription="@string/close_all_tabs"
|
||||||
|
app:backgroundTint="@android:color/black"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_clear_white_24dp" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
@ -239,4 +239,5 @@
|
|||||||
<string name="new_tab">New tab</string>
|
<string name="new_tab">New tab</string>
|
||||||
<string name="switch_tabs">Switch tabs</string>
|
<string name="switch_tabs">Switch tabs</string>
|
||||||
<string name="smiling_face">:D</string>
|
<string name="smiling_face">:D</string>
|
||||||
|
<string name="close_all_tabs">Close all tabs</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user