Support for location messages

Start with encoding as a simple image thumbnail for compatibility
with MMS and iOS

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-12-18 14:37:11 -08:00
parent 4fa6680f83
commit bcf95e50aa
24 changed files with 338 additions and 19 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -143,6 +143,29 @@
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"/>
<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>
</LinearLayout>

View File

@@ -46,6 +46,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center">
<org.thoughtcrime.securesms.components.location.SignalMapView
android:id="@+id/attachment_location"
android:layout_width="210dp"
android:layout_height="210dp"
android:layout_gravity="center_horizontal"
android:visibility="gone"/>
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/attachment_thumbnail"
android:layout_width="230dp"

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<com.google.android.gms.maps.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
<ImageView android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
tools:src="@drawable/ic_action_warning_red"
tools:visibility="visible"/>
</FrameLayout>
<TextView android:id="@+id/address_view"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"
android:padding="5dp"
tools:text="21 Jump St, Atlanta GA 30311"/>
</merge>

View File

@@ -617,6 +617,7 @@
<string name="attachment_type_selector__video">Video</string>
<string name="attachment_type_selector__contact">Contact</string>
<string name="attachment_type_selector__camera">Camera</string>
<string name="attachment_type_selector__location">Location</string>
<!-- change_passphrase_activity -->
<string name="change_passphrase_activity__old_passphrase">Old passphrase</string>