Add tabs to log fragment

This commit is contained in:
topjohnwu
2017-01-27 03:38:53 +08:00
parent 959ed7f866
commit ca9334b2df
13 changed files with 430 additions and 258 deletions
+22 -31
View File
@@ -1,36 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/svLog"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="?attr/actionBarSize"
tools:context="com.topjohnwu.magisk.LogFragment">
<HorizontalScrollView
android:id="@+id/hsvLog"
<android.support.design.widget.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:id="@+id/tab"
app:tabPaddingEnd="20dp"
app:tabPaddingStart="20dp"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ScrollViewSize">
</android.support.design.widget.TabLayout>
<TextView
android:id="@+id/txtLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:textIsSelectable="true"/>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
</HorizontalScrollView>
</ScrollView>
<android.support.v4.view.ViewPager
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/container"/>
</LinearLayout>
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/svLog"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize">
<HorizontalScrollView
android:id="@+id/hsvLog"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ScrollViewSize">
<TextView
android:id="@+id/txtLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:textIsSelectable="true"/>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
</HorizontalScrollView>
</ScrollView>
@@ -0,0 +1,28 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.topjohnwu.magisk.SuLogFragment">
<TextView
android:id="@+id/empty_rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="@string/log_is_empty"
android:textSize="20sp"
android:textStyle="italic"
android:visibility="gone" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:dividerHeight="@dimen/card_divider_space"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
</LinearLayout>
+1 -1
View File
@@ -20,7 +20,7 @@
android:id="@+id/superuser"
android:icon="@drawable/ic_superuser"
android:title="@string/superuser"
android:visible="true"/>
android:visible="false"/>
</group>
-5
View File
@@ -1,7 +1,5 @@
<resources>
<!--Universal-->
<string name="app_name" translatable="false">Magisk Manager</string>
<string name="magisk" translatable="false">Magisk</string>
<!--Welcome Activity-->
<string name="navigation_drawer_open">Otwórz szufladę nawigacji</string>
@@ -43,7 +41,6 @@
<string name="keep_dm_verity">Keep dm-verity</string>
<string name="current_magisk_title">Zainstalowana Wersja Magisk: v%1$s</string>
<string name="install_magisk_title">Ostatnia Wersja Magisk: v%1$.1f</string>
<string name="magiskify" translatable="false">Magiskify</string>
<!--Module Fragment-->
<string name="no_info_provided">(Nie umieszczono informacji)</string>
@@ -114,8 +111,6 @@
<!--Settings Activity -->
<string name="settings_general_category">Ogólne</string>
<string name="settings_theme_title">Motyw</string>
<string name="settings_theme_summary">Wybierz motyw</string>
<string name="theme_default">Domyślny</string>
<string name="theme_dark">Ciemny</string>
<string name="settings_clear_cache_title">Wyczyść Cache Repozytorium</string>
+3
View File
@@ -169,4 +169,7 @@
<string name="su_revoke_title">Revoke?</string>
<string name="su_revoke_msg">Confirm to revoke %1$s rights?</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>