forked from organicmaps/organicmaps
[android] Added "hide description logic" into guide's description block. Fixed title font.
This commit is contained in:
parent
f576c1300b
commit
8ea9de7753
2 changed files with 16 additions and 5 deletions
|
@ -12,16 +12,17 @@
|
|||
tools:src="@drawable/bg_ads" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/guide_description_block_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/margin_base"
|
||||
android:paddingBottom="@dimen/margin_base"
|
||||
android:paddingTop="@dimen/margin_base"
|
||||
android:paddingEnd="@dimen/margin_base">
|
||||
<TextView
|
||||
android:id="@+id/guide_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:textAppearance="?fontHeadline4"
|
||||
android:textAppearance="?textAppearanceHeadline5"
|
||||
android:textColor="?actionMenuTextColor"
|
||||
tools:text="@string/guides" />
|
||||
<TextView
|
||||
|
@ -31,6 +32,7 @@
|
|||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:text="@string/description_guide"
|
||||
android:layout_marginBottom="@dimen/margin_half"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?fontSubtitle2"
|
||||
android:textColor="?colorAccent" />
|
||||
|
|
|
@ -229,7 +229,8 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<BookmarkListA
|
|||
String imageUrl = mCategoryDataSource.getData().getImageUrl();
|
||||
if (imageUrl.isEmpty())
|
||||
UiUtils.hide(imageView);
|
||||
Glide.with(view.getContext())
|
||||
else
|
||||
Glide.with(view.getContext())
|
||||
.load(imageUrl)
|
||||
.centerCrop()
|
||||
.into(imageView);
|
||||
|
@ -237,6 +238,14 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<BookmarkListA
|
|||
TextView title = view.findViewById(R.id.guide_title);
|
||||
title.setText(mCategoryDataSource.getData().getName());
|
||||
|
||||
TextView descriptionBtn = view.findViewById(R.id.btn_description);
|
||||
boolean isHideDescriptionBtn = mCategoryDataSource.getData()
|
||||
.getDescription()
|
||||
.isEmpty() || mCategoryDataSource.getData()
|
||||
.getAnnotation()
|
||||
.isEmpty();
|
||||
UiUtils.hideIf(isHideDescriptionBtn, descriptionBtn);
|
||||
|
||||
BookmarkCategory.Author author = mCategoryDataSource.getData().getAuthor();
|
||||
ImageView imageViewLogo = view.findViewById(R.id.logo);
|
||||
TextView authorTextView = view.findViewById(R.id.content_by);
|
||||
|
|
Loading…
Add table
Reference in a new issue