summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-06-20 19:04:31 +0400
committerAndrew Dolgov <[email protected]>2012-06-20 19:04:31 +0400
commit277c2e0e47392d80ab8cb89cd7ae0cf754c84963 (patch)
tree873ed03fd0ddaa6dbd06bdc4fbe6046f0c94298f
parentcd0cbcbd5aa46437b872f28813b46ea850d4b5f5 (diff)
tablet-related fixes
-rw-r--r--AndroidManifest.xml4
-rw-r--r--res/layout-xlarge/headlines_row.xml141
-rw-r--r--res/layout-xlarge/headlines_row_selected.xml139
-rw-r--r--res/layout-xlarge/headlines_row_unread.xml139
-rw-r--r--src/org/fox/ttrss/MainActivity.java8
5 files changed, 427 insertions, 4 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f928ff61..7e06f984 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
- android:versionCode="73"
- android:versionName="0.6.0" >
+ android:versionCode="74"
+ android:versionName="0.6.1" >
<uses-sdk android:minSdkVersion="11" />
diff --git a/res/layout-xlarge/headlines_row.xml b/res/layout-xlarge/headlines_row.xml
new file mode 100644
index 00000000..73e6b941
--- /dev/null
+++ b/res/layout-xlarge/headlines_row.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="?headlineNormalBackground"
+ android:orientation="vertical" >
+
+
+ <LinearLayout
+ android:id="@+id/linearLayout6"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+
+ <ImageView
+ android:id="@+id/headlines_separator"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?headlineSeparatorNormal"
+ android:paddingRight="4dip" />
+
+ <CheckBox
+ android:id="@+id/selected"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip" >
+ </CheckBox>
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:textColor="?headlineTextColor"
+ android:text="{Title...}"
+ android:textSize="16sp" >
+ </TextView>
+
+ <TextView
+ android:id="@+id/excerpt"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="{Content excerpt...}"
+ android:textColor="?headlineExcerptTextColor"
+ android:textSize="13sp" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="3dip" >
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Jan 01"
+ android:textColor="#909090"
+ android:textSize="13sp" >
+ </TextView>
+
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:padding="3dip" >
+ </TextView>
+
+ <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="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_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout-xlarge/headlines_row_selected.xml b/res/layout-xlarge/headlines_row_selected.xml
new file mode 100644
index 00000000..00171f0d
--- /dev/null
+++ b/res/layout-xlarge/headlines_row_selected.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="?headlineSelectedBackground"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/linearLayout6"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@+id/headlines_separator"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?headlineSeparatorSelected"
+ android:paddingRight="4dip" />
+
+ <CheckBox
+ android:id="@+id/selected"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip" >
+ </CheckBox>
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:textColor="?headlineSelectedTextColor"
+ android:text="{Title...}"
+ android:textSize="16sp" >
+ </TextView>
+
+ <TextView
+ android:id="@+id/excerpt"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="{Content excerpt...}"
+ android:textColor="?headlineSelectedExcerptTextColor"
+ android:textSize="13sp" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="3dip" >
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Jan 01"
+ android:textColor="#909090"
+ android:textSize="13sp" >
+ </TextView>
+
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:padding="3dip" >
+ </TextView>
+
+ <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="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_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout-xlarge/headlines_row_unread.xml b/res/layout-xlarge/headlines_row_unread.xml
new file mode 100644
index 00000000..1ba714ab
--- /dev/null
+++ b/res/layout-xlarge/headlines_row_unread.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="?headlineUnreadBackground"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/linearLayout6"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@+id/headlines_separator"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?headlineSeparatorUnread"
+ android:paddingRight="4dip" />
+
+ <CheckBox
+ android:id="@+id/selected"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip" >
+ </CheckBox>
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="{Title...}"
+ android:textColor="?headlineTextColor"
+ android:textSize="16sp" >
+ </TextView>
+
+ <TextView
+ android:id="@+id/excerpt"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="{Content excerpt...}"
+ android:textColor="?headlineExcerptTextColor"
+ android:textSize="13sp" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="3dip" >
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Jan 01"
+ android:textColor="#909090"
+ android:textSize="13sp" >
+ </TextView>
+
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:padding="3dip" >
+ </TextView>
+
+ <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="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_copy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:text="@string/attachment_copy" />
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java
index c8215534..2d9ce39d 100644
--- a/src/org/fox/ttrss/MainActivity.java
+++ b/src/org/fox/ttrss/MainActivity.java
@@ -503,7 +503,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
if (!m_compatMode) {
if (!m_smallScreenMode) {
- findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticle != null ? View.GONE : View.VISIBLE);
+ int orientation = getWindowManager().getDefaultDisplay().getOrientation();
+
+ findViewById(R.id.feeds_fragment).setVisibility(m_selectedArticle != null && orientation % 2 != 0 ? View.GONE : View.VISIBLE);
findViewById(R.id.article_fragment).setVisibility(m_selectedArticle != null ? View.VISIBLE : View.GONE);
}
@@ -1694,7 +1696,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
ft.hide(getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES));
ft.add(R.id.fragment_container, frag, FRAG_ARTICLE);
} else {
- findViewById(R.id.feeds_fragment).setVisibility(View.GONE);
+ int orientation = getWindowManager().getDefaultDisplay().getOrientation();
+
+ findViewById(R.id.feeds_fragment).setVisibility(orientation % 2 != 0 ? View.GONE : View.VISIBLE);
findViewById(R.id.article_fragment).setVisibility(View.VISIBLE);
ft.replace(R.id.article_fragment, frag, FRAG_ARTICLE);
}