-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(voting): improve voting button and grouping by date (#1335)
* feat: add voting period ends improvements * feat: use thumbs up/down logos instead * fix: crash on empty list * fix: update sorting to match user selection * feat: improve sorting * fix: prevent crash after view destroyed * chore: cleanup and add license
- Loading branch information
1 parent
e60a712
commit 80c8cd0
Showing
20 changed files
with
594 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- | ||
~ Copyright 2024 Dash Core Group. | ||
~ | ||
~ 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. | ||
~ | ||
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="17dp" | ||
android:height="16dp" | ||
android:viewportWidth="17" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M14.123,0.744H3.823C2.813,0.744 1.953,1.434 1.733,2.454L0.763,8.554C0.663,9.164 0.843,9.784 1.243,10.254C1.643,10.724 2.233,10.994 2.853,10.994H6.103V12.464C6.083,13.184 6.293,13.874 6.713,14.464C7.063,14.964 7.623,15.254 8.223,15.254C8.273,15.254 8.313,15.254 8.363,15.254C9.013,15.204 9.583,14.824 9.883,14.244L11.913,10.214C11.974,10.084 12.113,10.004 12.253,10.004H14.144C15.314,10.004 16.264,9.054 16.264,7.884V2.864C16.264,1.694 15.314,0.744 14.144,0.744H14.123ZM10.774,9.644L8.743,13.674C8.603,13.944 8.353,13.994 8.253,14.004C8.143,14.004 7.893,14.004 7.723,13.754C7.463,13.374 7.323,12.934 7.333,12.474L7.353,10.374C7.353,10.204 7.293,10.044 7.173,9.924C7.053,9.804 6.893,9.734 6.733,9.734H2.853C2.593,9.734 2.363,9.624 2.193,9.434C2.033,9.244 1.953,8.984 1.993,8.734L2.953,2.674C3.043,2.274 3.403,1.984 3.813,1.984H11.253V9.074C11.054,9.224 10.884,9.404 10.774,9.634V9.644ZM14.983,7.874C14.983,8.354 14.594,8.744 14.113,8.744H12.503V1.994H14.113C14.594,1.994 14.983,2.384 14.983,2.864V7.884V7.874Z" | ||
android:fillColor="#EA3943"/> | ||
</vector> |
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,25 @@ | ||
<!-- | ||
~ Copyright 2024 Dash Core Group. | ||
~ | ||
~ 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. | ||
~ | ||
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="17dp" | ||
android:height="16dp" | ||
android:viewportWidth="17" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M14.123,0.744H3.823C2.813,0.744 1.953,1.434 1.733,2.454L0.763,8.554C0.663,9.164 0.843,9.784 1.243,10.254C1.643,10.724 2.233,10.994 2.853,10.994H6.103V12.464C6.083,13.184 6.293,13.874 6.713,14.464C7.063,14.964 7.623,15.254 8.223,15.254C8.273,15.254 8.313,15.254 8.363,15.254C9.013,15.204 9.583,14.824 9.883,14.244L11.913,10.214C11.974,10.084 12.113,10.004 12.253,10.004H14.144C15.314,10.004 16.264,9.054 16.264,7.884V2.864C16.264,1.694 15.314,0.744 14.144,0.744H14.123ZM10.774,9.644L8.743,13.674C8.603,13.944 8.353,13.994 8.253,14.004C8.143,14.004 7.893,14.004 7.723,13.754C7.463,13.374 7.323,12.934 7.333,12.474L7.353,10.374C7.353,10.204 7.293,10.044 7.173,9.924C7.053,9.804 6.893,9.734 6.733,9.734H2.853C2.593,9.734 2.363,9.624 2.193,9.434C2.033,9.244 1.953,8.984 1.993,8.734L2.953,2.674C3.043,2.274 3.403,1.984 3.813,1.984H11.253V9.074C11.054,9.224 10.884,9.404 10.774,9.634V9.644ZM14.983,7.874C14.983,8.354 14.594,8.744 14.113,8.744H12.503V1.994H14.113C14.594,1.994 14.983,2.384 14.983,2.864V7.884V7.874Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
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,25 @@ | ||
<!-- | ||
~ Copyright 2024 Dash Core Group. | ||
~ | ||
~ 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. | ||
~ | ||
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="17dp" | ||
android:height="16dp" | ||
android:viewportWidth="17" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M2.877,15.256H13.177C14.186,15.256 15.047,14.566 15.267,13.546L16.236,7.446C16.337,6.836 16.156,6.216 15.757,5.746C15.356,5.276 14.767,5.006 14.146,5.006H10.896V3.536C10.917,2.816 10.707,2.126 10.286,1.536C9.937,1.036 9.377,0.746 8.777,0.746C8.727,0.746 8.687,0.746 8.637,0.746C7.987,0.796 7.417,1.176 7.117,1.756L5.087,5.786C5.027,5.916 4.887,5.996 4.747,5.996H2.857C1.687,5.996 0.737,6.946 0.737,8.116V13.136C0.737,14.306 1.687,15.256 2.857,15.256H2.877ZM6.227,6.356L8.257,2.326C8.397,2.056 8.647,2.006 8.747,1.996C8.857,1.996 9.107,1.996 9.277,2.246C9.537,2.626 9.677,3.066 9.667,3.526L9.647,5.626C9.647,5.796 9.707,5.956 9.827,6.076C9.947,6.196 10.106,6.266 10.267,6.266H14.146C14.406,6.266 14.637,6.376 14.807,6.566C14.967,6.756 15.047,7.016 15.007,7.266L14.047,13.326C13.957,13.726 13.597,14.016 13.186,14.016H5.747V6.926C5.947,6.776 6.117,6.596 6.227,6.366V6.356ZM2.017,8.126C2.017,7.646 2.407,7.256 2.887,7.256H4.497V14.006H2.887C2.407,14.006 2.017,13.616 2.017,13.136V8.116V8.126Z" | ||
android:fillColor="#008DE4"/> | ||
</vector> |
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,25 @@ | ||
<!-- | ||
~ Copyright 2024 Dash Core Group. | ||
~ | ||
~ 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. | ||
~ | ||
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="17dp" | ||
android:height="16dp" | ||
android:viewportWidth="17" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M2.877,15.256H13.177C14.186,15.256 15.047,14.566 15.267,13.546L16.236,7.446C16.337,6.836 16.156,6.216 15.757,5.746C15.356,5.276 14.767,5.006 14.146,5.006H10.896V3.536C10.917,2.816 10.707,2.126 10.286,1.536C9.937,1.036 9.377,0.746 8.777,0.746C8.727,0.746 8.687,0.746 8.637,0.746C7.987,0.796 7.417,1.176 7.117,1.756L5.087,5.786C5.027,5.916 4.887,5.996 4.747,5.996H2.857C1.687,5.996 0.737,6.946 0.737,8.116V13.136C0.737,14.306 1.687,15.256 2.857,15.256H2.877ZM6.227,6.356L8.257,2.326C8.397,2.056 8.647,2.006 8.747,1.996C8.857,1.996 9.107,1.996 9.277,2.246C9.537,2.626 9.677,3.066 9.667,3.526L9.647,5.626C9.647,5.796 9.707,5.956 9.827,6.076C9.947,6.196 10.106,6.266 10.267,6.266H14.146C14.406,6.266 14.637,6.376 14.807,6.566C14.967,6.756 15.047,7.016 15.007,7.266L14.047,13.326C13.957,13.726 13.597,14.016 13.186,14.016H5.747V6.926C5.947,6.776 6.117,6.596 6.227,6.366V6.356ZM2.017,8.126C2.017,7.646 2.407,7.256 2.887,7.256H4.497V14.006H2.887C2.407,14.006 2.017,13.616 2.017,13.136V8.116V8.126Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
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
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,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright 2024 Dash Core Group. | ||
~ | ||
~ 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. | ||
~ | ||
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
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:layout_width="match_parent" | ||
android:layout_height="36dp" | ||
tools:context="de.schildbach.wallet.ui.username.adapters.DateViewHolder"> | ||
|
||
<TextView | ||
android:id="@+id/date_heading" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:textAlignment="center" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
android:maxLines="1" | ||
android:ellipsize="middle" | ||
tools:text="Voting period ends in 14 days"/> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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
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
Oops, something went wrong.