Created a dialog for the main page content

This commit is contained in:
Somethingweirdhere 2018-06-09 11:33:03 +02:00 committed by Christian Schabesberger
parent edb75c4bab
commit 8ecbe4c8ad
13 changed files with 225 additions and 146 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/firstText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/selection"
android:textStyle="bold" />
<android.support.v7.widget.RecyclerView
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
<TextView
android:id="@+id/secondText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/chosenTabs"
android:textStyle="bold" />
<android.support.v7.widget.RecyclerView
android:id="@+id/usedTabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:orientation="horizontal"
android:padding="4dp">
<TextView
android:id="@+id/cancelText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="4dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:text="@string/cancel"
android:textColor="@color/black_settings_accent_color" />
<TextView
android:id="@+id/confirmText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="4dp"
android:text="@string/accept"
android:textColor="@color/black_settings_accent_color" />
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tabName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp" />
<Button
android:id="@+id/buttonAddRemove"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="22dp"
android:background="@color/dark_background_color"
android:layout_alignParentRight="true"
android:layout_marginRight="22dp" />
<Button
android:id="@+id/buttonDown"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentTop="true"
android:layout_toStartOf="@+id/buttonAddRemove"
android:background="@color/dark_background_color"
android:layout_toLeftOf="@+id/buttonAddRemove" />
<Button
android:id="@+id/buttonUp"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/buttonDown"
android:layout_toStartOf="@+id/buttonDown"
android:background="@color/dark_background_color" />
</RelativeLayout>

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_show_downloads"
android:orderInCategory="980"
android:title="@string/downloads"
app:showAsAction="never"/>
<item
android:id="@+id/action_history"
android:orderInCategory="981"
android:title="@string/action_history"
app:showAsAction="never"/>
<item
android:id="@+id/action_settings"
android:orderInCategory="990"
android:title="@string/settings"
app:showAsAction="never"/>
<item
android:id="@+id/action_about"
android:orderInCategory="1000"
android:title="@string/action_about"/>
</menu>

View file

@ -357,6 +357,9 @@
<!-- Content -->
<string name="main_page_content">Content of main page</string>
<string name="main_page_content_summary">What tabs are shown on the main page</string>
<string name="selection">Selection</string>
<string name="chosenTabs">Your tabs</string>
<string name="blank_page_summary">Blank Page</string>
<string name="kiosk_page_summary">Kiosk Page</string>
<string name="subscription_page_summary">Subscription Page</string>

View file

@ -43,13 +43,10 @@
android:title="@string/download_thumbnail_title"
android:summary="@string/download_thumbnail_summary"/>
<ListPreference
android:defaultValue="@string/kiosk_page_key"
android:entries="@array/main_page_content_names"
android:entryValues="@array/main_page_content_pages"
<Preference
android:summary="@string/main_page_content_summary"
android:key="@string/main_page_content_key"
android:title="@string/main_page_content"
android:summary="%s"/>
android:title="@string/main_page_content"/>
<Preference
android:summary="@string/import_data_summary"