forked from organicmaps/organicmaps
[android] Show different hints if bookmarks are absent/present
This commit is contained in:
parent
263eca8a9b
commit
a4f620d34b
2 changed files with 8 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
android:layout_height="match_parent" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bookmarks_usage_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
@ -14,4 +15,4 @@
|
|||
android:text="@string/bookmarks_usage_hint"
|
||||
android:textSize="@dimen/sp_x_3" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
|
|
@ -52,8 +52,12 @@ public class BookmarkCategoriesAdapter extends AbstractBookmarkCategoryAdapter
|
|||
public View getView(int position, View convertView, ViewGroup parent)
|
||||
{
|
||||
if (getItemViewType(position) == HELP)
|
||||
return LayoutInflater.from(getContext()).inflate(R.layout.bookmark_hint, null);
|
||||
|
||||
{
|
||||
final View hintView = LayoutInflater.from(getContext()).inflate(R.layout.bookmark_hint, null);
|
||||
if (super.getCount() > 0)
|
||||
((TextView)hintView.findViewById(R.id.bookmarks_usage_hint)).setText(R.string.bookmarks_usage_hint_import_only);
|
||||
return hintView;
|
||||
}
|
||||
|
||||
if (convertView == null)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue