Renamed text view ids and added tools namespace
This commit is contained in:
parent
c661be344e
commit
f6370cc2b9
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvtitle"
|
||||
android:id="@+id/emptyViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="empty"
|
||||
tools:text="empty"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingBottom="10dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvmessage"
|
||||
android:id="@+id/emptyViewMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:text="empty"
|
||||
tools:text="empty"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:textAlignment="center"/>
|
||||
|
|
Loading…
Reference in New Issue