refactor layouts naming scheme
This commit is contained in:
parent
415d79199d
commit
dffc737a93
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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 + "=?",
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/sw600dp_anchor"
|
4
org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines.xml
Executable file → Normal file
4
org.fox.ttrss/src/main/res/layout-sw600dp-land/headlines.xml
Executable file → Normal file
@ -4,7 +4,7 @@
|
||||
android:fitsSystemWindows="true"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragment_container"
|
||||
@ -12,7 +12,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@+id/actionbar_toolbar">
|
||||
android:layout_below="@+id/toolbar">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/sw600dp_anchor"
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/sw600dp_anchor"
|
||||
@ -19,7 +19,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@+id/actionbar_toolbar">
|
||||
android:layout_below="@+id/toolbar">
|
||||
|
||||
<FrameLayout
|
||||
android:paddingRight="4dp"
|
2
org.fox.ttrss/src/main/res/layout/headlines_articles.xml → org.fox.ttrss/src/main/res/layout/activity_headlines_articles.xml
Executable file → Normal file
2
org.fox.ttrss/src/main/res/layout/headlines_articles.xml → org.fox.ttrss/src/main/res/layout/activity_headlines_articles.xml
Executable file → Normal file
@ -20,5 +20,5 @@
|
||||
android:background="?headlinesBackground">
|
||||
</FrameLayout>
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
</FrameLayout>
|
0
org.fox.ttrss/src/main/res/layout/subscribe.xml → org.fox.ttrss/src/main/res/layout/activity_subscribe.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/subscribe.xml → org.fox.ttrss/src/main/res/layout/activity_subscribe.xml
Executable file → Normal file
@ -37,6 +37,6 @@
|
||||
android:visibility="invisible" />
|
||||
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
1
org.fox.ttrss/src/main/res/layout/headlines_divider.xml → org.fox.ttrss/src/main/res/layout/drawer_divider.xml
Executable file → Normal file
1
org.fox.ttrss/src/main/res/layout/headlines_divider.xml → org.fox.ttrss/src/main/res/layout/drawer_divider.xml
Executable file → Normal file
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/headlines_footer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
0
org.fox.ttrss/src/main/res/layout/article_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_article.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/article_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_article.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/cats_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_cats.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/cats_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_cats.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/feeds_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_feeds.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/feeds_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_feeds.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/headlines_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
Executable file → Normal file
0
org.fox.ttrss/src/main/res/layout/headlines_fragment.xml → org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
Executable file → Normal file
2
org.fox.ttrss/src/main/res/layout/headlines.xml
Executable file → Normal file
2
org.fox.ttrss/src/main/res/layout/headlines.xml
Executable file → Normal file
@ -17,7 +17,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="?headlinesBackground"></FrameLayout>
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
<TextView
|
||||
android:background="?android:colorBackground"
|
||||
|
@ -14,9 +14,9 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@+id/actionbar_toolbar">
|
||||
android:layout_below="@+id/toolbar">
|
||||
</FrameLayout>
|
||||
|
||||
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
|
||||
|
||||
</RelativeLayout>
|
@ -2,7 +2,7 @@
|
||||
<android.support.v7.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/actionbar_toolbar"
|
||||
android:id="@+id/toolbar"
|
||||
android:elevation="4dp"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
Loading…
Reference in New Issue
Block a user