diff options
23 files changed, 370 insertions, 283 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index e5071a74..bc4254c1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="91" - android:versionName="0.7.0" > + android:versionCode="98" + android:versionName="0.7.6" > - <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" /> + <uses-sdk + android:minSdkVersion="8" + android:targetSdkVersion="11" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> @@ -17,37 +19,37 @@ android:icon="@drawable/icon" android:label="@string/app_name" > <activity - android:label="@string/app_name" - android:name=".LoginActivity" > + android:name=".LoginActivity" + android:label="@string/app_name" > </activity> <activity - android:label="@string/app_name" - android:name=".offline.OfflineActivity" > + android:name=".offline.OfflineActivity" + android:label="@string/app_name" > </activity> <activity - android:label="@string/app_name" - android:name=".MainActivity" > - <intent-filter > + android:name=".MainActivity" + android:label="@string/app_name" > + <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity - android:label="@string/preferences" - android:name=".PreferencesActivity" > + android:name=".PreferencesActivity" + android:label="@string/preferences" > </activity> <service - android:enabled="true" - android:name=".offline.OfflineDownloadService" /> + android:name=".offline.OfflineDownloadService" + android:enabled="true" /> <service - android:enabled="true" - android:name=".offline.OfflineUploadService" /> + android:name=".offline.OfflineUploadService" + android:enabled="true" /> <service - android:enabled="true" - android:name=".util.ImageCacheService" /> - + android:name=".util.ImageCacheService" + android:enabled="true" /> + <meta-data android:name="com.google.android.backup.api_key" android:value="AEdPqrEAAAAIwG6zsGB4qo6ZhjfwIJpm9WI7AqmWaoRXm6ZJnA" /> diff --git a/res/layout-port/headlines_row.xml b/res/layout-port/headlines_row.xml index e3f4b705..8f65f7ec 100644 --- a/res/layout-port/headlines_row.xml +++ b/res/layout-port/headlines_row.xml @@ -138,10 +138,14 @@ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-port/headlines_row_selected.xml b/res/layout-port/headlines_row_selected.xml index f348cc8e..8c5af7f9 100644 --- a/res/layout-port/headlines_row_selected.xml +++ b/res/layout-port/headlines_row_selected.xml @@ -139,10 +139,14 @@ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-port/headlines_row_unread.xml b/res/layout-port/headlines_row_unread.xml index 7770bcc0..35b2dead 100644 --- a/res/layout-port/headlines_row_unread.xml +++ b/res/layout-port/headlines_row_unread.xml @@ -69,8 +69,8 @@ android:layout_weight="1"
android:text="Jan 01, 00:00"
android:textColor="?headlineExcerptTextColor"
- android:textSize="11sp" /> -
+ android:textSize="11sp" />
+
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
@@ -138,11 +138,14 @@ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp-port/headlines_row_selected.xml b/res/layout-sw600dp-port/headlines_row_selected.xml index 616f96ba..0b74394c 100644 --- a/res/layout-sw600dp-port/headlines_row_selected.xml +++ b/res/layout-sw600dp-port/headlines_row_selected.xml @@ -35,8 +35,8 @@ android:layout_height="match_parent"
android:ellipsize="end"
android:singleLine="true"
- android:textColor="?headlineSelectedTextColor"
android:text="{Title...}"
+ android:textColor="?headlineSelectedTextColor"
android:textSize="16sp" >
</TextView>
@@ -100,41 +100,45 @@ android:layout_weight="1"
android:padding="3dip" >
</TextView>
-
- <LinearLayout
- android:id="@+id/attachments_holder"
+
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
-
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp/headlines_row.xml b/res/layout-sw600dp/headlines_row.xml index bb673f9f..7055bdda 100644 --- a/res/layout-sw600dp/headlines_row.xml +++ b/res/layout-sw600dp/headlines_row.xml @@ -6,7 +6,6 @@ android:background="?headlineNormalBackground"
android:orientation="vertical" >
-
<LinearLayout
android:id="@+id/linearLayout6"
android:layout_width="match_parent"
@@ -36,8 +35,8 @@ android:layout_height="match_parent"
android:ellipsize="end"
android:singleLine="true"
- android:textColor="?headlineTextColor"
android:text="{Title...}"
+ android:textColor="?headlineTextColor"
android:textSize="16sp" >
</TextView>
@@ -102,40 +101,44 @@ android:padding="3dip" >
</TextView>
- <LinearLayout
- android:id="@+id/attachments_holder"
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
-
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp/headlines_row_selected.xml b/res/layout-sw600dp/headlines_row_selected.xml index 5df99772..7774357f 100644 --- a/res/layout-sw600dp/headlines_row_selected.xml +++ b/res/layout-sw600dp/headlines_row_selected.xml @@ -35,8 +35,8 @@ android:layout_height="match_parent"
android:ellipsize="end"
android:singleLine="true"
- android:textColor="?headlineSelectedTextColor"
android:text="{Title...}"
+ android:textColor="?headlineSelectedTextColor"
android:textSize="16sp" >
</TextView>
@@ -100,42 +100,45 @@ android:layout_weight="1"
android:padding="3dip" >
</TextView>
-
- <LinearLayout
- android:id="@+id/attachments_holder"
+
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
-
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp/headlines_row_unread.xml b/res/layout-sw600dp/headlines_row_unread.xml index 5ccac557..27b33cce 100644 --- a/res/layout-sw600dp/headlines_row_unread.xml +++ b/res/layout-sw600dp/headlines_row_unread.xml @@ -101,41 +101,44 @@ android:padding="3dip" >
</TextView>
- <LinearLayout
- android:id="@+id/attachments_holder"
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
-
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/headlines_row.xml b/res/layout/headlines_row.xml index a339b18e..b76909e3 100644 --- a/res/layout/headlines_row.xml +++ b/res/layout/headlines_row.xml @@ -6,7 +6,6 @@ android:background="?headlineNormalBackground"
android:orientation="vertical" >
-
<LinearLayout
android:id="@+id/linearLayout6"
android:layout_width="match_parent"
@@ -50,7 +49,7 @@ android:textSize="13sp" >
</TextView>
</LinearLayout>
-
+
<LinearLayout
android:id="@+id/linerLayout3"
android:layout_width="wrap_content"
@@ -104,7 +103,6 @@ </ImageView>
</LinearLayout>
</LinearLayout>
-
</LinearLayout>
<TextView
@@ -115,41 +113,44 @@ android:padding="3dip" >
</TextView>
- <LinearLayout
- android:id="@+id/attachments_holder"
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
-
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/headlines_row_selected.xml b/res/layout/headlines_row_selected.xml index edffdd2c..ae24d5d8 100644 --- a/res/layout/headlines_row_selected.xml +++ b/res/layout/headlines_row_selected.xml @@ -49,7 +49,7 @@ android:textSize="13sp" >
</TextView>
</LinearLayout>
-
+
<LinearLayout
android:id="@+id/linerLayout3"
android:layout_width="wrap_content"
@@ -103,7 +103,6 @@ </ImageView>
</LinearLayout>
</LinearLayout>
-
</LinearLayout>
<TextView
@@ -113,41 +112,45 @@ android:layout_weight="1"
android:padding="3dip" >
</TextView>
-
- <LinearLayout
- android:id="@+id/attachments_holder"
+
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
-
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/headlines_row_unread.xml b/res/layout/headlines_row_unread.xml index 96fa7bd1..088e468b 100644 --- a/res/layout/headlines_row_unread.xml +++ b/res/layout/headlines_row_unread.xml @@ -49,7 +49,7 @@ android:textSize="13sp" >
</TextView>
</LinearLayout>
-
+
<LinearLayout
android:id="@+id/linerLayout3"
android:layout_width="wrap_content"
@@ -103,7 +103,6 @@ </ImageView>
</LinearLayout>
</LinearLayout>
-
</LinearLayout>
<TextView
@@ -114,40 +113,44 @@ android:padding="3dip" >
</TextView>
- <LinearLayout
- android:id="@+id/attachments_holder"
+ <LinearLayout
+ android:id="@+id/attachments_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0" >
+
+ <Spinner
+ android:id="@+id/attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0" >
+ android:layout_weight="1"
+ android:prompt="@string/attachments_prompt" />
- <Spinner
- android:id="@+id/attachments"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:prompt="@string/attachments_prompt" />
+ <Button
+ android:id="@+id/attachment_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_view" />
- <Button
- android:id="@+id/attachment_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_view" />
+ <Button
+ android:id="@+id/attachment_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
- <Button
- android:id="@+id/attachment_copy"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:text="@string/attachment_copy" />
- </LinearLayout>
-
- <ImageButton
+ <ImageButton
android:id="@+id/article_menu_button"
+ android:layout_width="50dp"
+ android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@android:color/transparent"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:paddingBottom="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="4dp"
+ android:scaleType="fitEnd"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
-
+
</LinearLayout>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 137af4d9..3a3fc913 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -123,4 +123,11 @@ <string name="close_article">Close article</string> <string name="dialog_open_preferences">Open preferences</string> <string name="dialog_need_configure_prompt">Please fill in your tt-rss server information such as URL, login, and password.</string> + <string name="notify_article_marked">Article starred</string> + <string name="notify_article_unmarked">Article unstarred</string> + <string name="notify_article_published">Article published</string> + <string name="notify_article_unpublished">Article unpublished</string> + <string name="notify_article_note_set">Article note saved</string> + <string name="force_small_tablet_ui">Force compact interface</string> + <string name="prefs_for_tablets">Tablets</string> </resources>
\ No newline at end of file diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 291a5ce5..6bc4c427 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -2,21 +2,18 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="@string/connection" >
-
<EditTextPreference
android:key="login"
android:singleLine="true"
android:summary="@string/login_summary"
android:title="@string/login" >
</EditTextPreference>
-
<EditTextPreference
android:key="password"
android:password="true"
android:singleLine="true"
android:title="@string/password" >
</EditTextPreference>
-
<EditTextPreference
android:hint="@string/default_url"
android:inputType="textUri"
@@ -31,16 +28,13 @@ android:key="ssl_trust_any"
android:title="@string/ssl_trust_any" />
</PreferenceCategory>
-
<PreferenceCategory android:title="@string/http_authentication" >
-
<EditTextPreference
android:key="http_login"
android:singleLine="true"
android:summary="@string/http_login_summary"
android:title="@string/login" >
</EditTextPreference>
-
<EditTextPreference
android:key="http_password"
android:password="true"
@@ -48,9 +42,9 @@ android:title="@string/password" >
</EditTextPreference>
</PreferenceCategory>
-
- <PreferenceCategory android:key="category_look_and_feel" android:title="@string/look_and_feel" >
-
+ <PreferenceCategory
+ android:key="category_look_and_feel"
+ android:title="@string/look_and_feel" >
<ListPreference
android:defaultValue="THEME_DARK"
android:entries="@array/pref_theme_names"
@@ -58,7 +52,6 @@ android:key="theme"
android:summary="@string/pref_theme_long"
android:title="@string/pref_theme" />
-
<ListPreference
android:defaultValue="0"
android:entries="@array/pref_font_size_names"
@@ -70,52 +63,50 @@ android:defaultValue="false"
android:key="sort_feeds_by_unread"
android:title="@string/sort_feeds_by_unread" />
-
<CheckBoxPreference
android:defaultValue="false"
android:key="download_feed_icons"
android:title="@string/download_feed_icons" />
-
<CheckBoxPreference
android:defaultValue="false"
android:key="enable_cats"
android:title="@string/enable_cats" />
-
<CheckBoxPreference
android:defaultValue="false"
- android:key="browse_cats_like_feeds"
android:dependency="enable_cats"
+ android:key="browse_cats_like_feeds"
android:summary="@string/browse_cats_like_feeds_summary"
android:title="@string/browse_cats_like_feeds" />
-
<CheckBoxPreference
android:defaultValue="false"
android:key="combined_mode"
android:summary="@string/combined_mode_summary"
android:title="@string/combined_mode" />
-
+ <CheckBoxPreference
+ android:defaultValue="true"
+ android:key="justify_article_text"
+ android:title="@string/justify_article_text" />
+ </PreferenceCategory>
+ <PreferenceCategory
+ android:key="category_tablets"
+ android:title="@string/prefs_for_tablets" >
<CheckBoxPreference
android:defaultValue="false"
android:key="tablet_article_swipe"
android:title="@string/tablet_article_swipe" />
-
<CheckBoxPreference
- android:defaultValue="true"
- android:key="justify_article_text"
- android:title="@string/justify_article_text" />
+ android:defaultValue="false"
+ android:key="force_small_tablet_ui"
+ android:title="@string/force_small_tablet_ui" />
</PreferenceCategory>
-
<PreferenceCategory android:title="@string/offline_mode" >
-
<CheckBoxPreference
android:defaultValue="false"
android:key="offline_image_cache_enabled"
android:summary="@string/offline_image_cache_enabled_summary"
android:title="@string/offline_image_cache_enabled" />
</PreferenceCategory>
-
<PreferenceCategory android:title="@string/debugging" >
-
<CheckBoxPreference
android:defaultValue="false"
android:key="transport_debugging"
diff --git a/src/org/fox/ttrss/CommonActivity.java b/src/org/fox/ttrss/CommonActivity.java index f0b678ae..3e254535 100644 --- a/src/org/fox/ttrss/CommonActivity.java +++ b/src/org/fox/ttrss/CommonActivity.java @@ -2,8 +2,10 @@ package org.fox.ttrss; import org.fox.ttrss.util.DatabaseHelper;
+import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
+import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.util.FloatMath;
@@ -19,6 +21,8 @@ public class CommonActivity extends FragmentActivity { public final static String FRAG_FEEDS = "feeds";
public final static String FRAG_CATS = "cats";
+ private SharedPreferences m_prefs;
+
private SQLiteDatabase m_readableDb;
private SQLiteDatabase m_writableDb;
@@ -31,6 +35,16 @@ public class CommonActivity extends FragmentActivity { m_smallScreenMode = smallScreen;
}
+ public void toast(int msgId) {
+ Toast toast = Toast.makeText(CommonActivity.this, msgId, Toast.LENGTH_SHORT);
+ toast.show();
+ }
+
+ public void toast(String msg) {
+ Toast toast = Toast.makeText(CommonActivity.this, msg, Toast.LENGTH_SHORT);
+ toast.show();
+ }
+
protected void detectSmallTablet() {
DisplayMetrics displayMetrics = new DisplayMetrics();
@@ -41,7 +55,7 @@ public class CommonActivity extends FragmentActivity { float inDiag = FloatMath.sqrt(inHeight * inHeight + inWidth * inWidth);
- if (inDiag < 9) {
+ if (inDiag < 9 || m_prefs.getBoolean("force_small_tablet_ui", false)) {
m_smallTablet = true;
}
@@ -78,6 +92,9 @@ public class CommonActivity extends FragmentActivity { m_compatMode = android.os.Build.VERSION.SDK_INT <= 10;
+ m_prefs = PreferenceManager
+ .getDefaultSharedPreferences(getApplicationContext());
+
Log.d(TAG, "m_compatMode=" + m_compatMode);
detectSmallTablet();
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index c8d0ce2d..4cb77858 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -658,6 +658,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, return m_adapter.getItem(position);
} catch (IndexOutOfBoundsException e) {
return null;
+ } catch (NullPointerException e) {
+ return null;
}
}
@@ -694,7 +696,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, }
public int getArticlePosition(Article article) {
- return m_adapter.getPosition(article);
+ try {
+ return m_adapter.getPosition(article);
+ } catch (NullPointerException e) {
+ return -1;
+ }
}
public void setSearchQuery(String query) {
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index bb72543c..1ac736e2 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -183,15 +183,17 @@ public class MainActivity extends CommonActivity implements OnlineServices { if (m_activeFeed.is_cat) { FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS); - ft.show(cats); - - cats.setSelectedCategory(null); + if (cats != null) { + ft.show(cats); + cats.setSelectedCategory(null); + } } else { FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS); - - ft.show(feeds); - - feeds.setSelectedFeed(null); + + if (feeds != null) { + ft.show(feeds); + feeds.setSelectedFeed(null); + } } } else { @@ -307,8 +309,7 @@ public class MainActivity extends CommonActivity implements OnlineServices { refresh(); - Toast toast = Toast.makeText(MainActivity.this, R.string.offline_sync_success, Toast.LENGTH_SHORT); - toast.show(); + toast(R.string.offline_sync_success); } } @@ -381,7 +382,11 @@ public class MainActivity extends CommonActivity implements OnlineServices { @SuppressWarnings({ "unchecked", "serial" }) public void saveArticleMarked(final Article article) { - ApiRequest req = new ApiRequest(getApplicationContext()); + ApiRequest req = new ApiRequest(getApplicationContext()) { + protected void onPostExecute(JsonElement result) { + toast(article.marked ? R.string.notify_article_marked : R.string.notify_article_unmarked); + } + }; HashMap<String, String> map = new HashMap<String, String>() { { @@ -392,13 +397,18 @@ public class MainActivity extends CommonActivity implements OnlineServices { put("field", "0"); } }; - + req.execute(map); } @SuppressWarnings({ "unchecked", "serial" }) public void saveArticlePublished(final Article article) { - ApiRequest req = new ApiRequest(getApplicationContext()); + + ApiRequest req = new ApiRequest(getApplicationContext()) { + protected void onPostExecute(JsonElement result) { + toast(article.published ? R.string.notify_article_published : R.string.notify_article_unpublished); + } + }; HashMap<String, String> map = new HashMap<String, String>() { { @@ -415,7 +425,11 @@ public class MainActivity extends CommonActivity implements OnlineServices { @SuppressWarnings({ "unchecked", "serial" }) public void saveArticleNote(final Article article, final String note) { - ApiRequest req = new ApiRequest(getApplicationContext()); + ApiRequest req = new ApiRequest(getApplicationContext()) { + protected void onPostExecute(JsonElement result) { + toast(R.string.notify_article_note_set); + } + }; HashMap<String, String> map = new HashMap<String, String>() { { @@ -1017,10 +1031,14 @@ public class MainActivity extends CommonActivity implements OnlineServices { if (m_activeFeed.is_cat) { FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS); - cats.setSelectedCategory(null); + if (cats != null) { + cats.setSelectedCategory(null); + } } else { FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS); - feeds.setSelectedFeed(null); + if (feeds != null) { + feeds.setSelectedFeed(null); + } } m_activeFeed = null; @@ -1397,8 +1415,8 @@ public class MainActivity extends CommonActivity implements OnlineServices { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); - //intent.putExtra(Intent.EXTRA_SUBJECT, article.title); - intent.putExtra(Intent.EXTRA_TEXT, article.title + " " + article.link); + intent.putExtra(Intent.EXTRA_SUBJECT, article.title); + intent.putExtra(Intent.EXTRA_TEXT, article.link); return intent; } diff --git a/src/org/fox/ttrss/PreferencesActivity.java b/src/org/fox/ttrss/PreferencesActivity.java index 41fb00f2..017888f9 100644 --- a/src/org/fox/ttrss/PreferencesActivity.java +++ b/src/org/fox/ttrss/PreferencesActivity.java @@ -19,11 +19,6 @@ public class PreferencesActivity extends PreferenceActivity { .getDefaultSharedPreferences(getApplicationContext());
addPreferencesFromResource(R.xml.preferences);
-
- if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) != Configuration.SCREENLAYOUT_SIZE_XLARGE) {
- PreferenceCategory category = (PreferenceCategory)findPreference("category_look_and_feel");
- category.removePreference(findPreference("tablet_article_swipe"));
- }
findPreference("justify_article_text").setEnabled(!prefs.getBoolean("combined_mode", false));
diff --git a/src/org/fox/ttrss/offline/OfflineActivity.java b/src/org/fox/ttrss/offline/OfflineActivity.java index 82241c89..4e48a4da 100644 --- a/src/org/fox/ttrss/offline/OfflineActivity.java +++ b/src/org/fox/ttrss/offline/OfflineActivity.java @@ -569,8 +569,8 @@ public class OfflineActivity extends CommonActivity implements Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); - //intent.putExtra(Intent.EXTRA_SUBJECT, title); - intent.putExtra(Intent.EXTRA_TEXT, title + " " + link); + intent.putExtra(Intent.EXTRA_SUBJECT, title); + intent.putExtra(Intent.EXTRA_TEXT, link); return intent; } diff --git a/src/org/fox/ttrss/types/Article.java b/src/org/fox/ttrss/types/Article.java index 2ad86e91..bf9614e8 100644 --- a/src/org/fox/ttrss/types/Article.java +++ b/src/org/fox/ttrss/types/Article.java @@ -27,6 +27,10 @@ public class Article implements Parcelable { readFromParcel(in);
}
+ public Article() {
+
+ }
+
public Article(int id) {
this.id = id;
this.title = "";
diff --git a/src/org/fox/ttrss/types/Attachment.java b/src/org/fox/ttrss/types/Attachment.java index 7b77d5db..58e5b37f 100644 --- a/src/org/fox/ttrss/types/Attachment.java +++ b/src/org/fox/ttrss/types/Attachment.java @@ -19,6 +19,10 @@ public class Attachment implements Parcelable { readFromParcel(in);
}
+ public Attachment() {
+
+ }
+
@Override
public int describeContents() {
return 0;
diff --git a/src/org/fox/ttrss/types/Feed.java b/src/org/fox/ttrss/types/Feed.java index 25077686..91d12308 100644 --- a/src/org/fox/ttrss/types/Feed.java +++ b/src/org/fox/ttrss/types/Feed.java @@ -24,6 +24,10 @@ public class Feed implements Comparable<Feed>, Parcelable { readFromParcel(in);
}
+ public Feed() {
+
+ }
+
@Override
public int compareTo(Feed feed) {
if (feed.unread != this.unread)
diff --git a/src/org/fox/ttrss/types/FeedCategory.java b/src/org/fox/ttrss/types/FeedCategory.java index d4f68bfb..202a2dd6 100644 --- a/src/org/fox/ttrss/types/FeedCategory.java +++ b/src/org/fox/ttrss/types/FeedCategory.java @@ -20,6 +20,10 @@ public class FeedCategory implements Parcelable { this.order_id = 0;
}
+ public FeedCategory() {
+
+ }
+
@Override
public int describeContents() {
return 0;
diff --git a/src/org/fox/ttrss/types/Label.java b/src/org/fox/ttrss/types/Label.java index fd4ce930..ff81ffa6 100644 --- a/src/org/fox/ttrss/types/Label.java +++ b/src/org/fox/ttrss/types/Label.java @@ -6,4 +6,8 @@ public class Label { public String fg_color;
public String bg_color;
public boolean checked;
+
+ public Label() {
+
+ }
}
|