Initial support for sources' login. Upgrade support library version.

This commit is contained in:
inorichi
2015-10-26 01:41:10 +01:00
parent e857a44987
commit 0e9e80b081
15 changed files with 353 additions and 17 deletions

View File

@@ -0,0 +1,53 @@
<?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"
android:padding="24dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/accounts_login_title"
android:id="@+id/accounts_login"
android:textStyle="bold"
android:textSize="16sp"
android:layout_gravity="center_horizontal" />
<View android:id="@+id/titleDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_grey"
android:layout_marginTop="6dp"
android:layout_marginBottom="24dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/username"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/username" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/password"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:ems="10"
android:id="@+id/password" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/show_password"
android:id="@+id/show_password"
android:layout_marginTop="10dp"/>
</LinearLayout>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pref_category_reader_key">pref_category_reader_key</string>
<string name="pref_category_accounts_key">pref_category_accounts_key</string>
<string name="pref_hide_status_bar_key">pref_hide_status_bar_key</string>
<string name="pref_default_viewer_key">pref_default_viewer_key</string>
</resources>

View File

@@ -46,13 +46,25 @@
<string name="manga_detail_tab">Info</string>
<string name="manga_chapters_tab">Chapters</string>
<string name="title_activity_viewer">ViewerActivity</string>
<!-- Preferences -->
<string name="title_activity_settings">Settings</string>
<string name="pref_category_reader">Reader</string>
<string name="pref_category_accounts">Accounts</string>
<string name="pref_hide_status_bar">Hide status bar</string>
<string name="pref_hide_status_bar_summary">This option will hide the status bar while reading</string>
<string name="pref_viewer_type">Default viewer</string>
<string name="left_to_right_viewer">Left to right</string>
<string name="right_to_left_viewer">Right to left</string>
<string name="vertical_viewer">Vertical</string>
<string name="webtoon_viewer">Webtoon (experimental)</string>
<string name="accounts_login_title">Login for %1$s</string>
<string name="username">Username</string>
<string name="password">Password</string>
<string name="show_password">Show password</string>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:orderingFromXml="true">
</PreferenceScreen>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<Preference
android:key="@string/pref_category_reader_key"
android:persistent="false"
android:title="@string/pref_category_reader" />
<Preference
android:key="@string/pref_category_accounts_key"
android:persistent="false"
android:title="@string/pref_category_accounts" />
</PreferenceScreen>

View File

@@ -2,12 +2,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference android:title="@string/pref_hide_status_bar"
android:key="pref_hide_status_bar_key"
android:defaultValue="false"
android:summary="@string/pref_hide_status_bar_summary"
android:key="hide_status_bar" />
android:summary="@string/pref_hide_status_bar_summary" />
<ListPreference android:title="@string/pref_viewer_type"
android:key="default_viewer"
android:key="pref_default_viewer_key"
android:entries="@array/viewers"
android:entryValues="@array/viewers_values"
android:defaultValue="1"/>