From f6370cc2b90ae5b0fe92874964dd4643d46b67d0 Mon Sep 17 00:00:00 2001 From: Jatin Kumar Date: Tue, 2 Apr 2019 17:36:27 -0400 Subject: [PATCH] Renamed text view ids and added tools namespace --- .../antennapod/fragment/AllEpisodesFragment.java | 4 ++-- .../antennapod/fragment/FavoriteEpisodesFragment.java | 4 ++-- .../antennapod/fragment/NewEpisodesFragment.java | 4 ++-- .../de/danoeh/antennapod/fragment/QueueFragment.java | 4 ++-- .../de/danoeh/antennapod/view/EmptyViewHandler.java | 4 ++-- app/src/main/res/layout/empty_view_layout.xml | 11 ++++++----- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index 58d3861bf..a8d93375c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -335,8 +335,8 @@ public class AllEpisodesFragment extends Fragment { emptyView = (View) root.findViewById(R.id.emptyView); emptyView.setVisibility(View.GONE); - ((TextView)emptyView.findViewById(R.id.txtvtitle)).setText(R.string.no_all_episodes_head_label); - ((TextView)emptyView.findViewById(R.id.txtvmessage)).setText(R.string.no_all_episodes_label); + ((TextView)emptyView.findViewById(R.id.emptyViewTitle)).setText(R.string.no_all_episodes_head_label); + ((TextView)emptyView.findViewById(R.id.emptyViewMessage)).setText(R.string.no_all_episodes_label); return root; } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java index ed6c57f64..cda89bbd3 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java @@ -51,8 +51,8 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.all_episodes_fragment); - ((TextView)root.findViewById(R.id.txtvtitle)).setText(R.string.no_fav_episodes_head_label); - ((TextView)root.findViewById(R.id.txtvmessage)).setText(R.string.no_fav_episodes_label); + ((TextView)root.findViewById(R.id.emptyViewTitle)).setText(R.string.no_fav_episodes_head_label); + ((TextView)root.findViewById(R.id.emptyViewMessage)).setText(R.string.no_fav_episodes_label); ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) { @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java index 6dc01aa14..c2b61bf75 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NewEpisodesFragment.java @@ -46,8 +46,8 @@ public class NewEpisodesFragment extends AllEpisodesFragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.all_episodes_fragment); - ((TextView)root.findViewById(R.id.txtvtitle)).setText(R.string.no_new_episodes_head_label); - ((TextView)root.findViewById(R.id.txtvmessage)).setText(R.string.no_new_episodes_label); + ((TextView)root.findViewById(R.id.emptyViewTitle)).setText(R.string.no_new_episodes_head_label); + ((TextView)root.findViewById(R.id.emptyViewMessage)).setText(R.string.no_new_episodes_label); ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) { @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 07693a87f..7ea88bb8a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -496,8 +496,8 @@ public class QueueFragment extends Fragment { //empty view emptyView = (View) root.findViewById(R.id.emptyView); emptyView.setVisibility(View.GONE); - ((TextView)emptyView.findViewById(R.id.txtvtitle)).setText(R.string.no_items_header_label); - ((TextView)emptyView.findViewById(R.id.txtvmessage)).setText(R.string.no_items_label); + ((TextView)emptyView.findViewById(R.id.emptyViewTitle)).setText(R.string.no_items_header_label); + ((TextView)emptyView.findViewById(R.id.emptyViewMessage)).setText(R.string.no_items_label); progLoading = root.findViewById(R.id.progLoading); progLoading.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java index 5bd92687d..e3fd63235 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java @@ -41,10 +41,10 @@ public class EmptyViewHandler extends View { ((ViewGroup) listView.getParent()).addView(emptyView); listView.setEmptyView(emptyView); - TextView tvTitle = (TextView) emptyView.findViewById(R.id.txtvtitle); + TextView tvTitle = (TextView) emptyView.findViewById(R.id.emptyViewTitle); tvTitle.setText(title); - TextView tvMessage = (TextView) emptyView.findViewById(R.id.txtvmessage); + TextView tvMessage = (TextView) emptyView.findViewById(R.id.emptyViewMessage); tvMessage.setText(message); } diff --git a/app/src/main/res/layout/empty_view_layout.xml b/app/src/main/res/layout/empty_view_layout.xml index df0dcb2c1..051773e51 100644 --- a/app/src/main/res/layout/empty_view_layout.xml +++ b/app/src/main/res/layout/empty_view_layout.xml @@ -3,25 +3,26 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:gravity="center"> + android:gravity="center" + xmlns:tools="http://schemas.android.com/tools">