implement compact headline mode
This commit is contained in:
parent
4f6ac1ef05
commit
89823f32f1
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="282"
|
android:versionCode="283"
|
||||||
android:versionName="1.74" >
|
android:versionName="1.75" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="10"
|
android:minSdkVersion="10"
|
||||||
|
@ -302,6 +302,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
m_compactLayoutMode = savedInstanceState.getBoolean("compactLayoutMode");
|
m_compactLayoutMode = savedInstanceState.getBoolean("compactLayoutMode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("HL_COMPACT".equals(m_prefs.getString("headline_mode", "HL_DEFAULT")))
|
||||||
|
m_compactLayoutMode = true;
|
||||||
|
|
||||||
DisplayMetrics metrics = new DisplayMetrics();
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||||
m_maxImageSize = (int) (128 * metrics.density + 0.5);
|
m_maxImageSize = (int) (128 * metrics.density + 0.5);
|
||||||
@ -329,6 +332,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||||
|
|
||||||
|
if (!m_compactLayoutMode) {
|
||||||
|
list.setDividerHeight(0);
|
||||||
|
list.setDivider(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||||
Display display = wm.getDefaultDisplay();
|
Display display = wm.getDefaultDisplay();
|
||||||
@ -654,20 +662,20 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
int headlineSmallFontSize = Math.max(10, Math.min(18, headlineFontSize - 2));
|
int headlineSmallFontSize = Math.max(10, Math.min(18, headlineFontSize - 2));
|
||||||
|
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
int layoutId = R.layout.headlines_row;
|
int layoutId = m_compactLayoutMode ? R.layout.headlines_row_compact : R.layout.headlines_row;
|
||||||
|
|
||||||
switch (getItemViewType(position)) {
|
switch (getItemViewType(position)) {
|
||||||
case VIEW_LOADMORE:
|
case VIEW_LOADMORE:
|
||||||
layoutId = R.layout.headlines_row_loadmore;
|
layoutId = R.layout.headlines_row_loadmore;
|
||||||
break;
|
break;
|
||||||
case VIEW_UNREAD:
|
case VIEW_UNREAD:
|
||||||
layoutId = R.layout.headlines_row_unread;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_unread_compact : R.layout.headlines_row_unread;
|
||||||
break;
|
break;
|
||||||
case VIEW_SELECTED:
|
case VIEW_SELECTED:
|
||||||
layoutId = R.layout.headlines_row_selected;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_selected_compact : R.layout.headlines_row_selected;
|
||||||
break;
|
break;
|
||||||
case VIEW_SELECTED_UNREAD:
|
case VIEW_SELECTED_UNREAD:
|
||||||
layoutId = R.layout.headlines_row_selected_unread;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_selected_unread_compact : R.layout.headlines_row_selected_unread;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,7 +804,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_compactLayoutMode) {
|
if (!m_compactLayoutMode) {
|
||||||
if (holder.flavorImageView != null && m_prefs.getBoolean("headlines_show_flavor_image", true)) {
|
boolean showFlavorImage = "HL_DEFAULT".equals(m_prefs.getString("headline_mode", "HL_DEFAULT"));
|
||||||
|
|
||||||
|
if (holder.flavorImageView != null && showFlavorImage) {
|
||||||
holder.flavorImageArrow.setVisibility(View.GONE);
|
holder.flavorImageArrow.setVisibility(View.GONE);
|
||||||
|
|
||||||
Document doc = Jsoup.parse(articleContent);
|
Document doc = Jsoup.parse(articleContent);
|
||||||
|
@ -285,6 +285,9 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
m_activity.getWritableDb().execSQL("UPDATE articles SET selected = 0 ");
|
m_activity.getWritableDb().execSQL("UPDATE articles SET selected = 0 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("HL_COMPACT".equals(m_prefs.getString("headline_mode", "HL_DEFAULT")))
|
||||||
|
m_compactLayoutMode = true;
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.headlines_fragment, container, false);
|
View view = inflater.inflate(R.layout.headlines_fragment, container, false);
|
||||||
|
|
||||||
m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.headlines_swipe_container);
|
m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.headlines_swipe_container);
|
||||||
@ -307,6 +310,11 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
|
|
||||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||||
|
|
||||||
|
if (!m_compactLayoutMode) {
|
||||||
|
list.setDividerHeight(0);
|
||||||
|
list.setDivider(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||||
Display display = wm.getDefaultDisplay();
|
Display display = wm.getDefaultDisplay();
|
||||||
@ -501,22 +509,22 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
int headlineSmallFontSize = Math.max(10, Math.min(18, headlineFontSize - 2));
|
int headlineSmallFontSize = Math.max(10, Math.min(18, headlineFontSize - 2));
|
||||||
|
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
int layoutId = R.layout.headlines_row;
|
int layoutId = m_compactLayoutMode ? R.layout.headlines_row_compact : R.layout.headlines_row;
|
||||||
|
|
||||||
switch (getItemViewType(position)) {
|
switch (getItemViewType(position)) {
|
||||||
case VIEW_LOADMORE:
|
case VIEW_LOADMORE:
|
||||||
layoutId = R.layout.headlines_row_loadmore;
|
layoutId = R.layout.headlines_row_loadmore;
|
||||||
break;
|
break;
|
||||||
case VIEW_UNREAD:
|
case VIEW_UNREAD:
|
||||||
layoutId = R.layout.headlines_row_unread;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_unread_compact : R.layout.headlines_row_unread;
|
||||||
break;
|
break;
|
||||||
case VIEW_SELECTED_UNREAD:
|
case VIEW_SELECTED:
|
||||||
layoutId = R.layout.headlines_row_selected_unread;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_selected_compact : R.layout.headlines_row_selected;
|
||||||
break;
|
break;
|
||||||
case VIEW_SELECTED:
|
case VIEW_SELECTED_UNREAD:
|
||||||
layoutId = R.layout.headlines_row_selected;
|
layoutId = m_compactLayoutMode ? R.layout.headlines_row_selected_unread_compact : R.layout.headlines_row_selected_unread;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LayoutInflater vi = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
LayoutInflater vi = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
v = vi.inflate(layoutId, null);
|
v = vi.inflate(layoutId, null);
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
android:orientation="horizontal" >
|
android:orientation="horizontal" >
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
android:paddingRight="4dp"
|
||||||
android:id="@+id/headlines_fragment"
|
android:id="@+id/headlines_fragment"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
android:id="@+id/headlines_list"
|
android:id="@+id/headlines_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layoutAnimation="@anim/layout_headline"
|
android:layoutAnimation="@anim/layout_headline"
|
||||||
android:dividerHeight="0dp"
|
|
||||||
android:divider="@null"
|
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
</ListView>
|
</ListView>
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
|
119
org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml
Normal file
119
org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/headlines_row"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="?headlineNormalBackground"
|
||||||
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/selected"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:focusable="false" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="Sample entry title"
|
||||||
|
android:textColor="?headlineUnreadTextColor"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/excerpt"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
|
android:textColor="?headlineExcerptTextColor"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/feed_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA"
|
||||||
|
android:textColor="?headlineSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_weight="0.5" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/headline_footer"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Jan 01, 12:00, 1970"
|
||||||
|
android:textColor="?headlineSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/marked"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_gravity="bottom|right"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:clickable="true"
|
||||||
|
android:src="@drawable/ic_star_empty" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <ImageView
|
||||||
|
android:id="@+id/article_menu_button"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:paddingRight="4dp"
|
||||||
|
android:src="@drawable/ic_action_overflow" /> -->
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -150,7 +150,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="by Author"
|
android:text="by Author"
|
||||||
android:textColor="?headlineSecondaryTextColor"
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="italic" />
|
android:textStyle="italic" />
|
||||||
|
|
||||||
|
@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/headlines_row"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="?headlineSelectedBackground"
|
||||||
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/selected"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:focusable="false" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="Sample entry title"
|
||||||
|
android:textColor="?headlineSelectedTextColor"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/excerpt"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
|
android:textColor="?headlineSelectedExcerptTextColor"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/feed_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA"
|
||||||
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_weight="0.5" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/headline_footer"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Jan 01, 12:00, 1970"
|
||||||
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/marked"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_gravity="bottom|right"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:clickable="true"
|
||||||
|
android:src="@drawable/ic_star_empty" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <ImageView
|
||||||
|
android:id="@+id/article_menu_button"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:paddingRight="4dp"
|
||||||
|
android:src="@drawable/ic_action_overflow" /> -->
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -151,7 +151,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="by Author"
|
android:text="by Author"
|
||||||
android:textColor="?headlineSecondaryTextColor"
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="italic" />
|
android:textStyle="italic" />
|
||||||
|
|
||||||
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/headlines_row"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="?headlineSelectedBackground"
|
||||||
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/selected"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:focusable="false" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="Sample entry title"
|
||||||
|
android:textColor="?headlineSelectedTextColor"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/excerpt"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
|
android:textColor="?headlineSelectedExcerptTextColor"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/feed_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA"
|
||||||
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_weight="0.5" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/headline_footer"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Jan 01, 12:00, 1970"
|
||||||
|
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/marked"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_gravity="bottom|right"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:clickable="true"
|
||||||
|
android:src="@drawable/ic_star_empty" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <ImageView
|
||||||
|
android:id="@+id/article_menu_button"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:paddingRight="4dp"
|
||||||
|
android:src="@drawable/ic_action_overflow" /> -->
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/headlines_row"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="?headlineUnreadBackground"
|
||||||
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/selected"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:focusable="false" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="Sample entry title"
|
||||||
|
android:textColor="?headlineUnreadTextColor"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/excerpt"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
|
android:textColor="?headlineExcerptTextColor"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_span="2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/feed_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA"
|
||||||
|
android:textColor="?headlineSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_weight="0.5" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/headline_footer"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Jan 01, 12:00, 1970"
|
||||||
|
android:textColor="?headlineSecondaryTextColor"
|
||||||
|
android:textSize="12sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/marked"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_gravity="bottom|right"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:clickable="true"
|
||||||
|
android:src="@drawable/ic_star_empty" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <ImageView
|
||||||
|
android:id="@+id/article_menu_button"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:paddingLeft="4dp"
|
||||||
|
android:paddingRight="4dp"
|
||||||
|
android:src="@drawable/ic_action_overflow" /> -->
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -11,6 +11,16 @@
|
|||||||
<item>THEME_SEPIA</item>
|
<item>THEME_SEPIA</item>
|
||||||
<item>THEME_AMBER</item>
|
<item>THEME_AMBER</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
<string-array name="headline_mode_names">
|
||||||
|
<item>@string/headline_display_mode_default</item>
|
||||||
|
<item>@string/headline_display_mode_no_images</item>
|
||||||
|
<item>@string/headline_display_mode_compact</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="headline_mode_values" translatable="false">
|
||||||
|
<item>HL_DEFAULT</item>
|
||||||
|
<item>HL_NOIMAGES</item>
|
||||||
|
<item>HL_COMPACT</item>
|
||||||
|
</string-array>
|
||||||
<string-array name="pref_offline_amounts" translatable="false">
|
<string-array name="pref_offline_amounts" translatable="false">
|
||||||
<item>150</item>
|
<item>150</item>
|
||||||
<item>250</item>
|
<item>250</item>
|
||||||
|
@ -254,5 +254,9 @@
|
|||||||
<string name="prefs_enable_fab">Enable FAB</string>
|
<string name="prefs_enable_fab">Enable FAB</string>
|
||||||
<string name="prefs_enable_fab_long">Show floating action button when reading</string>
|
<string name="prefs_enable_fab_long">Show floating action button when reading</string>
|
||||||
<string name="prefs_open_fresh_on_startup">Open Fresh articles on startup</string>
|
<string name="prefs_open_fresh_on_startup">Open Fresh articles on startup</string>
|
||||||
|
<string name="prefs_headline_display_mode">Headline display mode</string>
|
||||||
|
<string name="prefs_headline_display_mode_long">Cards, cards with images, or compact mode</string>
|
||||||
|
<string name="headline_display_mode_default">Default</string>
|
||||||
|
<string name="headline_display_mode_no_images">No images</string>
|
||||||
|
<string name="headline_display_mode_compact">Compact</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<item name="unreadCounterColor">#909090</item>
|
<item name="unreadCounterColor">#909090</item>
|
||||||
<item name="headlinesBackground">#f0f0f0</item>
|
<item name="headlinesBackground">#f0f0f0</item>
|
||||||
<item name="articleBackground">@android:color/white</item>
|
<item name="articleBackground">@android:color/white</item>
|
||||||
<item name="headlineSelectedBackground">?colorAccent</item>
|
<item name="headlineSelectedBackground">#88b0f0</item>
|
||||||
<item name="headlineUnreadBackground">@android:color/white</item>
|
<item name="headlineUnreadBackground">@android:color/white</item>
|
||||||
<item name="headlineNormalBackground">#f5f5f5</item>
|
<item name="headlineNormalBackground">#f5f5f5</item>
|
||||||
<item name="feedsSelectedBackground">?colorPrimaryDark</item>
|
<item name="feedsSelectedBackground">?colorPrimaryDark</item>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<item name="headlineSelectedTextColor">#ffffff</item>
|
<item name="headlineSelectedTextColor">#ffffff</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
<item name="headlineSecondaryTextColor">#909090</item>
|
<item name="headlineSecondaryTextColor">#909090</item>
|
||||||
<item name="headlineSelectedSecondaryTextColor">#606060</item>
|
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
<item name="headlineTitleHighScoreUnreadTextColor">#008000</item>
|
<item name="headlineTitleHighScoreUnreadTextColor">#008000</item>
|
||||||
<item name="linkColor">?colorPrimary</item>
|
<item name="linkColor">?colorPrimary</item>
|
||||||
@ -92,8 +92,8 @@
|
|||||||
<item name="headlineSecondaryTextColor">#909090</item>
|
<item name="headlineSecondaryTextColor">#909090</item>
|
||||||
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
|
<item name="headlineTitleHighScoreUnreadTextColor">#00FF00</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
<item name="headlineSelectedSecondaryTextColor">#a0a0a0</item>
|
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
|
||||||
<item name="headlineSelectedBackground">?colorPrimary</item>
|
<item name="headlineSelectedBackground">#88b0f0</item>
|
||||||
<item name="headlineUnreadBackground">#383c42</item>
|
<item name="headlineUnreadBackground">#383c42</item>
|
||||||
<item name="linkColor">?colorPrimary</item>
|
<item name="linkColor">?colorPrimary</item>
|
||||||
<item name="loadingBackground">@android:color/black</item>
|
<item name="loadingBackground">@android:color/black</item>
|
||||||
|
@ -85,10 +85,10 @@
|
|||||||
android:summary="@string/pref_headlines_show_content_long"
|
android:summary="@string/pref_headlines_show_content_long"
|
||||||
android:title="@string/pref_headlines_show_content" />
|
android:title="@string/pref_headlines_show_content" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<!-- <CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="headlines_show_flavor_image"
|
android:key="headlines_show_flavor_image"
|
||||||
android:title="@string/prefs_headlines_show_flavor_image" />
|
android:title="@string/prefs_headlines_show_flavor_image" /> -->
|
||||||
|
|
||||||
<!-- <CheckBoxPreference
|
<!-- <CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
@ -114,6 +114,14 @@
|
|||||||
android:dialogMessage="@string/pref_headline_font_size"
|
android:dialogMessage="@string/pref_headline_font_size"
|
||||||
android:title="@string/pref_headline_font_size" />
|
android:title="@string/pref_headline_font_size" />
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
|
android:defaultValue="HL_DEFAULT"
|
||||||
|
android:entries="@array/headline_mode_names"
|
||||||
|
android:entryValues="@array/headline_mode_values"
|
||||||
|
android:key="headline_mode"
|
||||||
|
android:summary="@string/prefs_headline_display_mode_long"
|
||||||
|
android:title="@string/prefs_headline_display_mode" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="open_fresh_on_startup"
|
android:key="open_fresh_on_startup"
|
||||||
|
Loading…
Reference in New Issue
Block a user