completely hide location button on API < 16

Closes #4964
// FREEBIE
This commit is contained in:
agrajaghh 2015-12-25 13:51:51 +01:00 committed by Moxie Marlinspike
parent f9c9068ca8
commit 759ecbc7b8
2 changed files with 16 additions and 23 deletions

View File

@ -138,34 +138,27 @@
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
<LinearLayout android:id="@+id/location_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/location_button"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ic_location_on_white_36dp"
android:scaleType="center"
android:elevation="4dp"
app:circleColor="@color/blue_grey_400"/>
<org.thoughtcrime.securesms.components.CircleColorImageView
android:id="@+id/location_button"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ic_location_on_white_36dp"
android:scaleType="center"
android:elevation="4dp"
app:circleColor="@color/blue_grey_400"/>
<TextView android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text="@string/attachment_type_selector__location"/>
</LinearLayout>
<TextView android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text="@string/attachment_type_selector__location"/>
</LinearLayout>

View File

@ -74,7 +74,7 @@ public class AttachmentTypeSelector extends PopupWindow {
this.closeButton.setOnClickListener(new CloseClickListener());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
this.locationButton.setVisibility(View.INVISIBLE);
ViewUtil.findById(layout, R.id.location_linear_layout).setVisibility(View.INVISIBLE);
}
setContentView(layout);