Commit edabdbad authored by Ricki Hirner's avatar Ricki Hirner

Collection properties: replace "Copy URL" button by selectable TextView

parent 47543e44
......@@ -45,13 +45,6 @@ class CollectionInfoFragment : DialogFragment() {
val view = requireActivity().layoutInflater.inflate(R.layout.collection_properties, null)
view.url.text = info.url.toString()
view.url_copy.setOnClickListener {
val clipboard = requireActivity().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val text = ClipData.newPlainText(info.displayName, info.url.toString())
clipboard.primaryClip = text
Toast.makeText(requireActivity(), R.string.copied_to_clipboard, Toast.LENGTH_LONG).show()
}
return AlertDialog.Builder(requireActivity())
.setTitle(info.displayName)
.setView(view)
......
<!--
~ Copyright © Ricki Hirner (bitfire web engineering).
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the GNU Public License v3.0
~ which accompanies this distribution, and is available at
~ http://www.gnu.org/licenses/gpl.html
-->
<vector android:alpha="0.54" android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
</vector>
......@@ -8,7 +8,6 @@
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -26,30 +25,13 @@
android:text="@string/collection_properties_url"
android:labelFor="@id/url" />
<LinearLayout
<TextView
android:id="@+id/url"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/url"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:textSize="12sp"/>
<ImageButton
android:id="@+id/url_copy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="1sp"
android:background="@android:color/transparent"
android:layout_marginLeft="4dp"
app:srcCompat="@drawable/ic_content_copy_dark"
android:contentDescription="@string/collection_properties_copy_url" />
</LinearLayout>
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:textSize="12sp"
android:textIsSelectable="true"/>
</LinearLayout>
......
......@@ -9,7 +9,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.dokka_version = '0.9.16'
ext.kotlin_version = '1.2.51'
ext.kotlin_version = '1.2.60'
repositories {
jcenter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment