Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@@ -793,6 +793,10 @@ class ChatController(args: Bundle) :
)
}
+ fun showShareLocationScreen(){
+ Log.d(TAG, "showShareLocationScreen")
+ }
+
private fun showConversationInfoScreen() {
val bundle = Bundle()
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, conversationUser)
@@ -35,6 +35,10 @@ import com.nextcloud.talk.models.database.CapabilitiesUtil
class AttachmentDialog(val activity: Activity, var chatController: ChatController) : BottomSheetDialog(activity) {
+ @BindView(R.id.txt_share_location)
+ @JvmField
+ var shareLocation: AppCompatTextView? = null
@BindView(R.id.txt_attach_file_from_local)
@JvmField
var attachFromLocal: AppCompatTextView? = null
@@ -60,6 +64,11 @@ class AttachmentDialog(val activity: Activity, var chatController: ChatControlle
String.format(it.getString(R.string.nc_upload_from_cloud), serverName)
+ shareLocation?.setOnClickListener {
+ chatController.showShareLocationScreen()
+ dismiss()
attachFromLocal?.setOnClickListener {
chatController.sendSelectLocalFileIntent()
dismiss()
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="#757575"
+ android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
+</vector>
@@ -38,6 +38,38 @@
android:textColor="@color/medium_emphasis_text"
android:textSize="@dimen/bottom_sheet_text_size" />
+ <LinearLayout
+ android:id="@+id/menu_share_location"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/selectableItemBackground"
+ android:orientation="horizontal"
+ android:paddingLeft="@dimen/standard_padding"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingRight="@dimen/standard_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ tools:ignore="UseCompoundDrawables">
+ <ImageView
+ android:id="@+id/menu_icon_share_location"
+ android:layout_width="wrap_content"
+ android:contentDescription="@null"
+ android:src="@drawable/ic_baseline_location_on_24"
+ app:tint="@color/colorPrimary" />
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/txt_share_location"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_margin"
+ android:text="@string/nc_share_location"
+ android:textColor="@color/high_emphasis_text"
+ android:textSize="@dimen/bottom_sheet_text_size" />
+ </LinearLayout>
<LinearLayout
android:id="@+id/menu_attach_file_from_local"
android:layout_width="match_parent"
@@ -371,6 +371,9 @@
<string name="nc_upload_confirm_send_single">Send this file to %1$s?</string>
<string name="nc_upload_in_progess">Uploading</string>
+ <!-- location sharing -->
+ <string name="nc_share_location">Share location</string>
<!-- Phonebook Integration -->
<string name="nc_settings_phone_book_integration_key" translatable="false">phone_book_integration</string>
<string name="nc_settings_phone_book_integration_desc">Match contacts based on phone number to integrate Talk shortcut into system contacts app</string>