summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-09-08 14:23:44 +0400
committerAndrew Dolgov <[email protected]>2011-09-08 14:23:44 +0400
commita04f7480142a787e22fb4e152aae566bf0c43f29 (patch)
tree7327b71472b5af2a2228529acb94908497c67d74 /res
parentbc06293a39687794b607e5231aa53f2881957ed7 (diff)
implement login
Diffstat (limited to 'res')
-rw-r--r--res/layout/login.xml12
-rw-r--r--res/menu/login_menu.xml15
-rw-r--r--res/menu/main_menu.xml12
-rw-r--r--res/values/arrays.xml12
-rw-r--r--res/values/attrs.xml4
-rw-r--r--res/values/strings.xml23
-rw-r--r--res/values/style.xml8
-rw-r--r--res/xml/preferences.xml24
8 files changed, 109 insertions, 1 deletions
diff --git a/res/layout/login.xml b/res/layout/login.xml
new file mode 100644
index 00000000..73fa1869
--- /dev/null
+++ b/res/layout/login.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:orientation='horizontal'
+ android:gravity="center"
+ android:layout_height="fill_parent">
+ <ProgressBar android:layout_height="wrap_content" android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge" android:id="@+id/login_progress"></ProgressBar>
+ <TextView android:id="@+id/login_status_text" android:layout_height="wrap_content" android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:text=""></TextView>
+
+
+
+</LinearLayout>
diff --git a/res/menu/login_menu.xml b/res/menu/login_menu.xml
new file mode 100644
index 00000000..0c244247
--- /dev/null
+++ b/res/menu/login_menu.xml
@@ -0,0 +1,15 @@
+
+ <menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:title="@string/preferences"
+ android:showAsAction="ifRoom|withText"
+ />
+
+ <item android:id="@+id/login"
+ android:icon="@android:drawable/ic_menu_rotate"
+ android:title="@string/login_login"
+ android:showAsAction="ifRoom|withText"
+ />
+
+ </menu>
diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml
new file mode 100644
index 00000000..8552cfcd
--- /dev/null
+++ b/res/menu/main_menu.xml
@@ -0,0 +1,12 @@
+
+ <menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:title="@string/preferences"
+ android:showAsAction="ifRoom|withText"/>
+
+ <item android:id="@+id/logout"
+ android:title="@string/logout"
+ android:showAsAction=""/>
+
+ </menu>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
new file mode 100644
index 00000000..fcac426d
--- /dev/null
+++ b/res/values/arrays.xml
@@ -0,0 +1,12 @@
+
+ <resources>
+ <string-array name="pref_theme_names">
+ <item>@string/theme_dark</item>
+ <item>@string/theme_light</item>
+ </string-array>
+
+ <string-array name="pref_theme_values">
+ <item>THEME_DARK</item>
+ <item>THEME_LIGHT</item>
+ </string-array>
+ </resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
new file mode 100644
index 00000000..9ad509d1
--- /dev/null
+++ b/res/values/attrs.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <attr name="placeholder" format="reference|color" />
+</resources> \ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 11c590fa..76ff7d7e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,5 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="hello">Hello World, MainActivity!</string>
+ <string name="login_session_error">Login session refused by server</string>
+ <string name="login_in_progress">Logging in...</string>
+ <string name="login_failed">Login failed.</string>
<string name="app_name">Tiny Tiny RSS</string>
+ <string name="login_need_configure">Please configure the application first.</string>
+ <string name="login_ready">Ready to login.</string>
+ <string name="login_login">Log in</string>
+ <string name="logout">Log out</string>
+ <string name="login">Login</string>
+ <string name="password">Password</string>
+ <string name="default_url">http://example.domain/tt-rss/</string>
+ <string name="authentication">Authentication</string>
+ <string name="look_and_feel">Look and feel</string>
+ <string name="pref_theme">Theme</string>
+ <string name="pref_theme_long">Changes color theme of the application.</string>
+ <string name="ttrss_url">Tiny Tiny RSS URL</string>
+ <string name="auto_login">Login automatically</string>
+ <string name="theme_dark">Dark</string>
+ <string name="preferences">Preferences</string>
+ <string name="theme_light">Light</string>
+ <string name="login_api_disabled">Login failed: API disabled.</string>
+ <string name="login_wrong_password">Login failed: username or password incorrect.</string>
+ <string name="login_success">Logged in.</string>
</resources>
diff --git a/res/values/style.xml b/res/values/style.xml
new file mode 100644
index 00000000..952f70ff
--- /dev/null
+++ b/res/values/style.xml
@@ -0,0 +1,8 @@
+<resources>
+ <style name="LightTheme" parent="android:Theme.Holo.Light">
+ </style>
+
+ <style name="DarkTheme" parent="android:Theme.Holo">
+ </style>
+
+</resources> \ No newline at end of file
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
new file mode 100644
index 00000000..c158a5f8
--- /dev/null
+++ b/res/xml/preferences.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory android:title="@string/authentication">
+
+ <EditTextPreference android:title="@string/login" android:key="login" android:singleLine="true"></EditTextPreference>
+ <EditTextPreference android:title="@string/password" android:key="password" android:singleLine="true" android:password="true"></EditTextPreference>
+ <EditTextPreference android:key="ttrss_url" android:title="@string/ttrss_url" android:singleLine="true" textUri="true" android:hint="@string/default_url"></EditTextPreference>
+ <CheckBoxPreference android:defaultValue="true" android:title="@string/auto_login" android:key="auto_login" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory android:title="@string/look_and_feel">
+ <ListPreference
+ android:title="@string/pref_theme"
+ android:key="theme"
+ android:defaultValue="THEME_DARK"
+ android:entries="@array/pref_theme_names"
+ android:entryValues="@array/pref_theme_values" android:summary="@string/pref_theme_long"/>
+ </PreferenceCategory>
+
+</PreferenceScreen> \ No newline at end of file