[android] Removed clicks on Progress view

This commit is contained in:
Dmitry Donskoy 2019-07-17 07:58:13 +03:00 committed by Roman Kuznetsov
parent 645115a7f5
commit 5e8152d7b0
3 changed files with 50 additions and 44 deletions

View file

@ -11,49 +11,56 @@
android:layout_height="wrap_content"
android:minHeight="@dimen/discovery_expert_item_min_height">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/discovery_search_item_min_height"
android:background="?attr/clickableBackground"
android:orientation="vertical"
android:gravity="center_horizontal">
<ProgressBar
android:id="@+id/progress"
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginTop="@dimen/margin_base_plus"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half_plus"
android:layout_marginLeft="@dimen/margin_half_plus"
android:layout_marginRight="@dimen/margin_half_plus"
style="@style/MwmWidget.Discovery.Item.Title"
android:maxLines="1"
android:minLines="1"
android:textAppearance="@style/MwmTextAppearance.Discovery.Item.Title"
tools:text="Irina Severintseva"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_eighth"
android:layout_marginLeft="@dimen/margin_half_plus"
android:layout_marginRight="@dimen/margin_half_plus"
style="@style/MwmWidget.Discovery.Item.Subtitle"
android:ellipsize="middle"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:text="★ ★ ★ ★ ★"/>
</LinearLayout>
<TextView
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Discovery.Item.Button"
style="@style/MwmWidget.Discovery.Item.Button"
android:layout_gravity="bottom"
android:lines="1"
android:text="@string/details"/>
android:minHeight="@dimen/discovery_expert_item_min_height">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:minHeight="@dimen/discovery_search_item_min_height"
android:background="?attr/clickableBackground"
android:orientation="vertical"
android:gravity="center_horizontal">
<ProgressBar
android:id="@+id/progress"
android:layout_width="@dimen/margin_base_plus"
android:layout_height="@dimen/margin_base_plus"
android:layout_marginTop="@dimen/margin_base_plus"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half_plus"
android:layout_marginLeft="@dimen/margin_half_plus"
android:layout_marginRight="@dimen/margin_half_plus"
style="@style/MwmWidget.Discovery.Item.Title"
android:maxLines="1"
android:minLines="1"
android:textAppearance="@style/MwmTextAppearance.Discovery.Item.Title"
tools:text="Irina Severintseva"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_eighth"
android:layout_marginLeft="@dimen/margin_half_plus"
android:layout_marginRight="@dimen/margin_half_plus"
style="@style/MwmWidget.Discovery.Item.Subtitle"
android:ellipsize="middle"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:text="★ ★ ★ ★ ★"/>
</LinearLayout>
<TextView
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Discovery.Item.Button"
style="@style/MwmWidget.Discovery.Item.Button"
android:layout_gravity="bottom"
android:lines="1"
android:text="@string/details"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</FrameLayout>

View file

@ -506,6 +506,7 @@ public class Holders
super.bind(item);
getTitle().setText(R.string.gallery_pp_download_guides_offline_title);
mSubTitle.setText(R.string.gallery_pp_download_guides_offline_subtitle);
UiUtils.hide(getButton());
}
}

View file

@ -110,9 +110,7 @@ public class Factory
@NonNull
public static GalleryAdapter createCatalogPromoLoadingAdapter(@NonNull ItemSelectedListener<Items.Item> listener)
{
NetworkPolicy policy = NetworkPolicy.newInstance(NetworkPolicy.getCurrentNetworkUsageStatus());
CatalogPromoLoadingAdapterStrategy strategy =
new CatalogPromoLoadingAdapterStrategy(listener, Promo.nativeGetCityUrl(policy));
CatalogPromoLoadingAdapterStrategy strategy = new CatalogPromoLoadingAdapterStrategy(null, null);
return new GalleryAdapter<>(strategy);
}