-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Show "copy" button for links/hashtags/mentions in accessibility…
… dialogs Users report that copying items can be difficult using Talkback. Make this easier in the dialogs that appear for links, mentions, and hashtags by using a dedicated adapter that displays a "Copy" button at the end of each item. Fixes #1038
- Loading branch information
1 parent
a012f94
commit 6beca4c
Showing
4 changed files
with
109 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/src/main/res/layout/simple_list_item_1_copy_button.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright 2024 Pachli Association | ||
~ | ||
~ This file is a part of Pachli. | ||
~ | ||
~ This program is free software; you can redistribute it and/or modify it under the terms of the | ||
~ GNU General Public License as published by the Free Software Foundation; either version 3 of the | ||
~ License, or (at your option) any later version. | ||
~ | ||
~ Pachli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even | ||
~ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
~ Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License along with Pachli; if not, | ||
~ see <http://www.gnu.org/licenses>. | ||
--> | ||
|
||
<!-- Like simple_list_item_1, but includes a button to copy the contents. --> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingStart="?android:attr/listPreferredItemPaddingStart" | ||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" | ||
android:minHeight="?android:attr/listPreferredItemHeightSmall"> | ||
|
||
<TextView | ||
android:id="@android:id/text1" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_gravity="center" | ||
android:layout_weight="1" | ||
android:gravity="center_vertical" | ||
android:textAppearance="?android:attr/textAppearanceListItemSmall" | ||
tools:text="#TestHashTag" /> | ||
|
||
<ImageButton | ||
android:id="@+id/copy" | ||
style="@style/AppImageButton" | ||
android:layout_width="48dp" | ||
android:layout_height="48dp" | ||
android:contentDescription="@string/action_copy_item" | ||
app:srcCompat="@drawable/ic_content_copy_24" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters