add entry to share location

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-05-11 14:54:57 +02:00 committed by Andy Scherzinger
parent 14b9d1c95c
commit c6d3abf421
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
5 changed files with 58 additions and 0 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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>

View File

@ -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:layout_height="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_width="match_parent"
android:layout_height="wrap_content"
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"

View File

@ -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>