diff options
author | Andrew Dolgov <[email protected]> | 2014-11-13 13:50:40 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-13 13:50:40 +0300 |
commit | 7b8a517e95e0d383091a1a71cc8c0cf9ef7a13fe (patch) | |
tree | 1c71d73faf59755b59b29fd2cfcd3ea23abf2a11 /org.fox.ttrss/src/main/java | |
parent | 7a9ce35f2e4b3e186819e08930f1cfdc3ad121e6 (diff) |
some more layout tweaks for consistency
remove some bad looking stuff from amber theme, make it darker
Diffstat (limited to 'org.fox.ttrss/src/main/java')
3 files changed, 11 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index b94e404d..b2765dc0 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -141,6 +141,11 @@ public class CommonActivity extends ActionBarActivity { super.onCreate(savedInstanceState); } + public int dpToPx(int dp) { + float density = getResources().getDisplayMetrics().density; + return Math.round((float)dp * density); + } + public void setStatusBarTint() { if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.KITKAT && !m_prefs.getBoolean("full_screen_mode", false)) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index ae174922..a5168aab 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -332,6 +332,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, // thanks google if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) { list.setDividerHeight(0); + + int px = m_activity.dpToPx(4); + list.setPadding(px, px, px, px); } if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index ce2f1170..a49bef60 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -310,6 +310,9 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis // thanks google if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) { list.setDividerHeight(0); + + int px = m_activity.dpToPx(4); + list.setPadding(px, px, px, px); } if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) { |