[android] Added dividers for last section buttons in PP

This commit is contained in:
Александр Зацепин 2017-04-26 20:15:16 +03:00 committed by r.kuznetsov
parent 31cf0c5455
commit d52b2a8f0c
3 changed files with 41 additions and 4 deletions

View file

@ -79,10 +79,25 @@
<include layout="@layout/place_page_editor"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/editor_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_add_business"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/add_business_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_add"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/add_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_local_ad"/>
<include layout="@layout/divider_horizontal"

View file

@ -65,10 +65,25 @@
<include layout="@layout/place_page_editor"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/editor_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_add_business"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/add_business_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_add"/>
<include layout="@layout/divider_horizontal"
android:id="@+id/add_divider"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<include layout="@layout/place_page_local_ad"/>
<include layout="@layout/divider_horizontal"

View file

@ -154,8 +154,11 @@ public class PlacePageView extends RelativeLayout
private TextView mTvEntrance;
private View mTaxi;
private View mEditPlace;
private View mEditPlaceDivider;
private View mAddOrganisation;
private View mAddOrganisationDivider;
private View mAddPlace;
private View mAddPlaceDivider;
private View mLocalAd;
private TextView mTvLocalAd;
// Bookmark
@ -351,10 +354,13 @@ public class PlacePageView extends RelativeLayout
orderTaxi.setOnClickListener(this);
mEditPlace = mDetails.findViewById(R.id.ll__place_editor);
mEditPlace.setOnClickListener(this);
mEditPlaceDivider = mDetails.findViewById(R.id.editor_divider);
mAddOrganisation = mDetails.findViewById(R.id.ll__add_organisation);
mAddOrganisation.setOnClickListener(this);
mAddOrganisationDivider = mDetails.findViewById(R.id.add_business_divider);
mAddPlace = mDetails.findViewById(R.id.ll__place_add);
mAddPlace.setOnClickListener(this);
mAddPlaceDivider = mDetails.findViewById(R.id.add_divider);
mLocalAd = mDetails.findViewById(R.id.ll__local_ad);
mLocalAd.setOnClickListener(this);
mTvLocalAd = (TextView) mLocalAd.findViewById(R.id.tv__local_ad);
@ -1235,13 +1241,14 @@ public class PlacePageView extends RelativeLayout
if (inRouting || MapManager.nativeIsLegacyMode())
{
UiUtils.hide(mEditPlace, mAddOrganisation, mAddPlace, mLocalAd);
UiUtils.hide(mEditPlace, mEditPlaceDivider, mAddOrganisation, mAddOrganisationDivider,
mAddPlace, mAddPlaceDivider, mLocalAd);
}
else
{
UiUtils.showIf(Editor.nativeShouldShowEditPlace(), mEditPlace);
UiUtils.showIf(Editor.nativeShouldShowAddBusiness(), mAddOrganisation);
UiUtils.showIf(Editor.nativeShouldShowAddPlace(), mAddPlace);
UiUtils.showIf(Editor.nativeShouldShowEditPlace(), mEditPlace, mEditPlaceDivider);
UiUtils.showIf(Editor.nativeShouldShowAddBusiness(), mAddOrganisation, mAddOrganisationDivider);
UiUtils.showIf(Editor.nativeShouldShowAddPlace(), mAddPlace, mAddPlaceDivider);
refreshLocalAdInfo(mapObject);
}
}