implement combined article display mode (closes #399)
This commit is contained in:
parent
24e092d190
commit
1fec72cf4a
@ -32,6 +32,13 @@
|
||||
android:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" >
|
||||
</WebView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -32,6 +32,13 @@
|
||||
android:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" >
|
||||
</WebView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -32,6 +32,13 @@
|
||||
android:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" >
|
||||
</WebView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1,45 +1,111 @@
|
||||
<?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:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineNormalBackground"
|
||||
android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
|
||||
<ImageView android:background="?headlineSeparatorNormal" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
|
||||
<CheckBox android:focusable="false"
|
||||
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
|
||||
<LinearLayout android:orientation="vertical" android:id="@+id/linearLayout1" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:singleLine="true" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/title" android:text="{Title...}" android:textSize="16sp"></TextView>
|
||||
<TextView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/excerpt" android:text="{Content excerpt...}" android:textSize="13sp" android:textColor="#909090"></TextView>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
|
||||
android:layout_height="wrap_content" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorNormal"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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>
|
||||
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -4,92 +4,106 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineSelectedBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorSelected"
|
||||
android:paddingRight="4dip" >
|
||||
</ImageView>
|
||||
|
||||
<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>
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout1"
|
||||
android:id="@+id/linearLayout6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="{Title...}"
|
||||
android:textSize="16sp" >
|
||||
</TextView>
|
||||
android:background="?headlineSeparatorSelected"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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"
|
||||
<CheckBox
|
||||
android:id="@+id/selected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jan 01"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
android:focusable="false"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="6dip" >
|
||||
</CheckBox>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:orientation="vertical"
|
||||
android:padding="3dip" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@android:drawable/star_off" >
|
||||
</ImageView>
|
||||
android:text="Jan 01"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/published"
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_rss_bw" >
|
||||
</ImageView>
|
||||
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>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -1,47 +1,109 @@
|
||||
<?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:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineUnreadBackground"
|
||||
android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
|
||||
<ImageView android:background="?headlineSeparatorUnread" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
|
||||
<CheckBox android:focusable="false"
|
||||
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
|
||||
|
||||
<LinearLayout android:layout_weight="1" android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="match_parent">
|
||||
<TextView android:singleLine="true" android:ellipsize="end" android:id="@+id/title" android:textSize="16sp" android:text="{Title...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
|
||||
<TextView android:id="@+id/excerpt" android:textSize="13sp" android:textColor="#909090" android:text="{Content excerpt...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
|
||||
android:layout_height="wrap_content" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorUnread"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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>
|
||||
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -1,45 +1,111 @@
|
||||
<?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:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineNormalBackground"
|
||||
android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
|
||||
<ImageView android:background="?headlineSeparatorNormal" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
|
||||
<CheckBox android:focusable="false"
|
||||
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
|
||||
<LinearLayout android:orientation="vertical" android:id="@+id/linearLayout1" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:singleLine="true" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/title" android:text="{Title...}" android:textSize="16sp"></TextView>
|
||||
<TextView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/excerpt" android:text="{Content excerpt...}" android:textSize="13sp" android:textColor="#909090"></TextView>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
|
||||
android:layout_height="wrap_content" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorNormal"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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>
|
||||
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -4,92 +4,106 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineSelectedBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorSelected"
|
||||
android:paddingRight="4dip" >
|
||||
</ImageView>
|
||||
|
||||
<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>
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout1"
|
||||
android:id="@+id/linearLayout6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="{Title...}"
|
||||
android:textSize="16sp" >
|
||||
</TextView>
|
||||
android:background="?headlineSeparatorSelected"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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"
|
||||
<CheckBox
|
||||
android:id="@+id/selected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jan 01"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
android:focusable="false"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="6dip" >
|
||||
</CheckBox>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:orientation="vertical"
|
||||
android:padding="3dip" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@android:drawable/star_off" >
|
||||
</ImageView>
|
||||
android:text="Jan 01"
|
||||
android:textColor="#909090"
|
||||
android:textSize="13sp" >
|
||||
</TextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/published"
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_rss_bw" >
|
||||
</ImageView>
|
||||
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>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -1,47 +1,109 @@
|
||||
<?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:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?headlineUnreadBackground"
|
||||
android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
|
||||
<ImageView android:background="?headlineSeparatorUnread" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
|
||||
<CheckBox android:focusable="false"
|
||||
android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
|
||||
|
||||
<LinearLayout android:layout_weight="1" android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="match_parent">
|
||||
<TextView android:singleLine="true" android:ellipsize="end" android:id="@+id/title" android:textSize="16sp" android:text="{Title...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
|
||||
<TextView android:id="@+id/excerpt" android:textSize="13sp" android:textColor="#909090" android:text="{Content excerpt...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linerLayout3"
|
||||
android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
|
||||
android:layout_height="wrap_content" android:orientation="vertical">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
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:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingRight="2sp"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlineSeparatorUnread"
|
||||
android:paddingRight="4dip" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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
|
||||
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:textSize="16sp" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="{Content excerpt...}"
|
||||
android:textColor="#909090"
|
||||
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>
|
||||
|
||||
|
||||
<WebView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="3dip" >
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
@ -85,5 +85,6 @@
|
||||
<string name="error_api_disabled">Error: API disabled for this user</string>
|
||||
<string name="error_api_unknown">Error: unknown API error (see log)</string>
|
||||
<string name="error_login_failed">Error: username or password incorrect</string>
|
||||
|
||||
<string name="combined_mode_summary">Displays articles inline, instead of a separate panel</string>
|
||||
<string name="combined_mode">Combined mode</string>
|
||||
</resources>
|
@ -29,6 +29,7 @@
|
||||
<CheckBoxPreference android:defaultValue="false" android:title="@string/enable_cats" android:key="enable_cats" />
|
||||
<CheckBoxPreference android:defaultValue="false" android:title="@string/browse_cats_like_feeds" android:key="browse_cats_like_feeds"
|
||||
android:summary="@string/browse_cats_like_feeds_summary" />
|
||||
<CheckBoxPreference android:defaultValue="false" android:summary="@string/combined_mode_summary" android:title="@string/combined_mode" android:key="combined_mode" />
|
||||
<CheckBoxPreference android:defaultValue="false" android:summary="@string/enable_ads_summary" android:title="@string/enable_ads" android:key="enable_ads" />
|
||||
</PreferenceCategory>
|
||||
|
||||
|
@ -99,8 +99,6 @@ public class ArticleFragment extends Fragment implements OnClickListener {
|
||||
|
||||
if (web != null) {
|
||||
|
||||
// this is ridiculous
|
||||
// TODO white on black style for dark theme
|
||||
String content;
|
||||
String cssOverride = "";
|
||||
|
||||
|
@ -13,7 +13,10 @@ import org.jsoup.Jsoup;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
@ -23,6 +26,7 @@ import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.AbsListView.OnScrollListener;
|
||||
import android.widget.AdapterView;
|
||||
@ -51,6 +55,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
private int m_activeArticleId;
|
||||
private boolean m_refreshInProgress = false;
|
||||
private boolean m_canLoadMore = false;
|
||||
private boolean m_combinedMode = true;
|
||||
|
||||
private SharedPreferences m_prefs;
|
||||
|
||||
private ArticleListAdapter m_adapter;
|
||||
private ArticleList m_articles = new ArticleList();
|
||||
@ -88,7 +95,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
m_articles = savedInstanceState.getParcelable("articles");
|
||||
m_activeArticleId = savedInstanceState.getInt("activeArticleId");
|
||||
m_selectedArticles = savedInstanceState.getParcelable("selectedArticles");
|
||||
m_canLoadMore = savedInstanceState.getBoolean("canLoadMore");
|
||||
m_canLoadMore = savedInstanceState.getBoolean("canLoadMore");
|
||||
m_combinedMode = savedInstanceState.getBoolean("combinedMode");
|
||||
}
|
||||
|
||||
View view = inflater.inflate(R.layout.headlines_fragment, container, false);
|
||||
@ -114,7 +122,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
m_feed = ((MainActivity)activity).getActiveFeed();
|
||||
m_prefs = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());
|
||||
m_articleOps = (ArticleOps) activity;
|
||||
m_combinedMode = m_prefs.getBoolean("combined_mode", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -184,6 +194,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
out.putInt("activeArticleId", m_activeArticleId);
|
||||
out.putParcelable("selectedArticles", m_selectedArticles);
|
||||
out.putBoolean("canLoadMore", m_canLoadMore);
|
||||
out.putBoolean("combinedMode", m_combinedMode);
|
||||
}
|
||||
|
||||
public void setLoadingStatus(int status, boolean showProgress) {
|
||||
@ -225,8 +236,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
else
|
||||
m_articles.remove(m_articles.size()-1); // remove previous placeholder
|
||||
|
||||
int last_position = m_articles.size();
|
||||
|
||||
for (Article f : articles)
|
||||
m_articles.add(f);
|
||||
|
||||
@ -241,12 +250,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
|
||||
m_adapter.notifyDataSetChanged();
|
||||
|
||||
/* ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
|
||||
if (list != null && m_offset != 0 && articles.size() > 0) {
|
||||
list.setSelection(last_position-1);
|
||||
} */
|
||||
|
||||
if (m_articles.size() == 0)
|
||||
setLoadingStatus(R.string.no_headlines_to_display, false);
|
||||
else
|
||||
@ -379,14 +382,48 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
TextView te = (TextView)v.findViewById(R.id.excerpt);
|
||||
|
||||
if (te != null) {
|
||||
String excerpt = Jsoup.parse(article.content).text();
|
||||
if (!m_combinedMode) {
|
||||
String excerpt = Jsoup.parse(article.content).text();
|
||||
|
||||
if (excerpt.length() > 100)
|
||||
excerpt = excerpt.substring(0, 100) + "...";
|
||||
if (excerpt.length() > 100)
|
||||
excerpt = excerpt.substring(0, 100) + "...";
|
||||
|
||||
te.setText(excerpt);
|
||||
te.setText(excerpt);
|
||||
} else {
|
||||
te.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
WebView web = (WebView)v.findViewById(R.id.content);
|
||||
|
||||
if (web != null) {
|
||||
if (m_combinedMode) {
|
||||
String content;
|
||||
String cssOverride = "";
|
||||
|
||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||
web.setBackgroundColor(android.R.color.black);
|
||||
cssOverride = "body { background : black; color : #f0f0f0}\n";
|
||||
}
|
||||
|
||||
content =
|
||||
"<html>" +
|
||||
"<head>" +
|
||||
"<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" +
|
||||
"<style type=\"text/css\">" +
|
||||
cssOverride +
|
||||
"img { max-width : 90%; }" +
|
||||
"body { text-align : justify; }" +
|
||||
"</style>" +
|
||||
"</head>" +
|
||||
"<body>" + article.content + "</body></html>";
|
||||
|
||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||
} else {
|
||||
web.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
TextView dv = (TextView) v.findViewById(R.id.date);
|
||||
|
||||
if (dv != null) {
|
||||
@ -481,7 +518,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(AbsListView view, int scrollState) {
|
||||
// TODO Auto-generated method stub
|
||||
// no-op
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user