diff options
author | Andrew Dolgov <[email protected]> | 2015-06-10 19:24:24 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-10 19:24:24 +0300 |
commit | dffc737a93f90ec866cb9256e9768b08b13de93c (patch) | |
tree | 877be4a66846acd60bd6b04254624c4b0dddaf84 /org.fox.ttrss/src/main/java/org | |
parent | 415d79199dcb39cac7e8f7d1979dfcbfaaa40aa6 (diff) |
refactor layouts naming scheme
Diffstat (limited to 'org.fox.ttrss/src/main/java/org')
22 files changed, 26 insertions, 60 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index d3d60419..9ad5103a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -173,7 +173,7 @@ public class ArticleFragment extends Fragment { //m_fsviewShown = savedInstanceState.getBoolean("fsviewShown"); } - final View view = inflater.inflate(R.layout.article_fragment, container, false); + final View view = inflater.inflate(R.layout.fragment_article, container, false); /* if (m_fsviewShown) { view.findViewById(R.id.article_fullscreen_video).setVisibility(View.VISIBLE); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java index cf532b81..2d35bb80 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java @@ -262,7 +262,7 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur setContentView(R.layout.article_images_pager); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); m_progress = (ProgressBar) findViewById(R.id.article_images_progress); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java index 035f523a..3aa16125 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java @@ -62,7 +62,7 @@ public abstract class BaseFeedlistFragment extends Fragment { /* deal with ~material~ footers */ // divider - View footer = inflater.inflate(R.layout.headlines_divider, list, false); + View footer = inflater.inflate(R.layout.drawer_divider, list, false); footer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java index 7bf799a9..659a6e36 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java @@ -10,7 +10,7 @@ public class DummyFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.dummy_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_dummy, container, false); return view; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index 7ab2ba2f..ea7f7f1e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -202,7 +202,7 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt m_cats = savedInstanceState.getParcelable("cats"); } - View view = inflater.inflate(R.layout.cats_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_cats, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java index 693238a6..5aafce6b 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsActivity.java @@ -58,7 +58,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); GlobalState.getInstance().load(savedInstanceState); @@ -67,20 +67,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe if (m_drawerLayout != null) { - /*View drawerList = findViewById(R.id.feeds_fragment); - - int minWidth = dpToPx(240); - int maxWidth = dpToPx(320); - - int width = (int)((float)getResources().getDisplayMetrics().widthPixels * 0.7f); - - if (width < minWidth) width = minWidth; - if (width > maxWidth) width = maxWidth; - - DrawerLayout.LayoutParams params = (android.support.v4.widget.DrawerLayout.LayoutParams) drawerList.getLayoutParams(); - params.width = width; - drawerList.setLayoutParams(params); */ - m_drawerToggle = new ActionBarDrawerToggle(this, m_drawerLayout, R.string.blank, R.string.blank) { @Override public void onDrawerOpened(View drawerView) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 2a3f571e..a4eb1910 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -255,7 +255,7 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi m_enableParentBtn = savedInstanceState.getBoolean("enableParentBtn"); } - View view = inflater.inflate(R.layout.feeds_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_feeds, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java index 17915a57..cd3dd375 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesActivity.java @@ -35,9 +35,9 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL super.onCreate(savedInstanceState); - setContentView(R.layout.headlines_articles); + setContentView(R.layout.activity_headlines_articles); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); m_forceDisableActionMode = isPortrait() || isSmallScreen(); 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 db76403c..90d4636f 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -348,7 +348,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, Log.d(TAG, "maxImageSize=" + m_maxImageSize); - View view = inflater.inflate(R.layout.headlines_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_headlines, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.headlines_swipe_container); @@ -741,7 +741,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, layoutId = R.layout.headlines_row_loadmore; break; case VIEW_SPACER: - layoutId = R.layout.dummy_fragment; + layoutId = R.layout.fragment_dummy; break; case VIEW_UNREAD: layoutId = m_compactLayoutMode ? R.layout.headlines_row_unread_compact : R.layout.headlines_row_unread; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java index f0802b0a..e8edca20 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java @@ -10,7 +10,7 @@ public class LoadingFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.loading_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_loading, container, false); return view; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index 8ad98997..5f2a13e3 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -165,7 +165,7 @@ public class OnlineActivity extends CommonActivity { setContentView(R.layout.login); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); if (!ImageLoader.getInstance().isInited()) { @@ -643,22 +643,6 @@ public class OnlineActivity extends CommonActivity { final ArticlePager ap = (ArticlePager)getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE); switch (item.getItemId()) { - /* case android.R.id.home: - finish(); - return true; */ - /* case R.id.headlines_toggle_sidebar: - if (true && !isSmallScreen()) { - View v = findViewById(R.id.headlines_fragment); - - if (v != null) { - SharedPreferences.Editor editor = m_prefs.edit(); - editor.putBoolean("headlines_hide_sidebar", !m_prefs.getBoolean("headlines_hide_sidebar", false)); - editor.commit(); - - v.setVisibility(m_prefs.getBoolean("headlines_hide_sidebar", false) ? View.GONE : View.VISIBLE); - } - } - return true; */ case R.id.subscribe_to_feed: Intent subscribe = new Intent(OnlineActivity.this, SubscribeActivity.class); startActivityForResult(subscribe, 0); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java index 525ec37a..d7740be5 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java @@ -18,7 +18,7 @@ public class PreferencesActivity extends CommonActivity { setContentView(R.layout.preferences); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java index 0dbfc11b..319477a1 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java @@ -172,7 +172,7 @@ public class OfflineActivity extends CommonActivity { setContentView(R.layout.login); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); invalidateOptionsMenu(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java index d3bb6c74..183df01a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -124,7 +124,7 @@ public class OfflineArticleFragment extends Fragment { m_articleId = savedInstanceState.getInt("articleId"); } - View view = inflater.inflate(R.layout.article_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_article, container, false); m_cursor = m_activity.getReadableDb().query("articles LEFT JOIN feeds ON (feed_id = feeds."+BaseColumns._ID+")", new String[] { "articles.*", "feeds.title AS feed_title" }, "articles." + BaseColumns._ID + "=?", diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java index 768cec82..771e89ac 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java @@ -130,7 +130,7 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen m_selectedCatId = savedInstanceState.getInt("selectedFeedId"); } - View view = inflater.inflate(R.layout.feeds_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_feeds, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index df059e4d..81bd8810 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -47,7 +47,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead setContentView(R.layout.headlines); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java index 825ffa03..59ee674e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java @@ -136,7 +136,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem m_enableParentBtn = savedInstanceState.getBoolean("enableParentBtn"); } - View view = inflater.inflate(R.layout.feeds_fragment, container, false); + View view = inflater.inflate(R.layout.fragment_feeds, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java index 967c7f75..5fb97a3d 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesActivity.java @@ -38,9 +38,9 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline super.onCreate(savedInstanceState); - setContentView(R.layout.headlines_articles); + setContentView(R.layout.activity_headlines_articles); - Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer); @@ -74,11 +74,7 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline getSupportActionBar().setHomeButtonEnabled(true); setSmallScreen(findViewById(R.id.sw600dp_anchor) == null); - - /* if (isPortrait() || m_prefs.getBoolean("headlines_hide_sidebar", false)) { - findViewById(R.id.headlines_fragment).setVisibility(View.GONE); - } */ - + if (savedInstanceState == null) { Intent i = getIntent(); 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 37cf627a..1b89c8ac 100755 --- 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 @@ -291,7 +291,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis 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.fragment_headlines, container, false); m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.headlines_swipe_container); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/share/ShareActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/share/ShareActivity.java index fb48580d..85e18b6b 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/share/ShareActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/share/ShareActivity.java @@ -39,7 +39,7 @@ public class ShareActivity extends CommonShareActivity { contentValue = savedInstanceState.getString("content"); } - setContentView(R.layout.share); + setContentView(R.layout.activity_share); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ic_launcher); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/share/SubscribeActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/share/SubscribeActivity.java index 107459ad..a3b7d060 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/share/SubscribeActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/share/SubscribeActivity.java @@ -87,7 +87,7 @@ public class SubscribeActivity extends CommonShareActivity { m_cats.addAll(list); } - setContentView(R.layout.subscribe); + setContentView(R.layout.activity_subscribe); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ic_launcher); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/FontSizeDialogPreference.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/FontSizeDialogPreference.java index ec7af2e5..87a89c16 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/FontSizeDialogPreference.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/FontSizeDialogPreference.java @@ -45,7 +45,7 @@ public class FontSizeDialogPreference extends DialogPreference { setProgressTextSuffix(" " + context.getString(R.string.font_size_dialog_suffix)); // set layout - setDialogLayoutResource(R.layout.select_font_size_dialog); + setDialogLayoutResource(R.layout.dialog_select_font_size); setPositiveButtonText(android.R.string.ok); setNegativeButtonText(android.R.string.cancel); setDialogIcon(null); |