Show empty state in my tracks
This commit is contained in:
parent
ba7dee373f
commit
db18af870f
3 changed files with 10 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/ctx_menu_info_view_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ExpandableListView
|
||||
|
@ -17,4 +18,9 @@
|
|||
android:drawSelectorOnTop="false"
|
||||
android:groupIndicator="@android:color/transparent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -327,6 +327,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
footerView = inflater.inflate(R.layout.list_shadow_footer, null, false);
|
||||
listView.addFooterView(footerView);
|
||||
TextView emptyTextView = (TextView) v.findViewById(android.R.id.empty);
|
||||
emptyTextView.setText("There are no gpx items");
|
||||
listView.setEmptyView(emptyTextView);
|
||||
if (this.adapter != null) {
|
||||
listView.setAdapter(this.adapter);
|
||||
}
|
||||
|
|
|
@ -148,9 +148,7 @@ public class FavoritesActivity extends TabActivity {
|
|||
|
||||
List<TabItem> mTabs = new ArrayList<>();
|
||||
mTabs.add(getTabIndicator(FAV_TAB, FavoritesTreeFragment.class));
|
||||
if (hasGpx) {
|
||||
mTabs.add(getTabIndicator(GPX_TAB, AvailableGPXFragment.class));
|
||||
}
|
||||
mTabs.add(getTabIndicator(GPX_TAB, AvailableGPXFragment.class));
|
||||
OsmandPlugin.addMyPlacesTabPlugins(this, mTabs, getIntent());
|
||||
return mTabs;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue