nextcloud-talk-android/app/src/main/res/layout/dialog_poll_results.xml
Marcel Hibbe b504af1cd9 add UI logic + close poll system message
add close poll button (wip/temporarily?)
add "close poll" system message
add UI related logic to PollMainViewModel
add placeholder for pollDetails in UI

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00

74 lines
3 KiB
XML

<!--
Nextcloud Android client application
@author Marcel Hibbe
Copyright (C) 2021 Marcel Hibbe <dev@mhibbe.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:padding="@dimen/standard_padding"
tools:background="@color/white">
<LinearLayout
android:id="@+id/poll_results_list_wrapper"
android:layout_width="match_parent"
android:layout_height="288dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/poll_results_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:listitem="@layout/poll_result_item" />
</LinearLayout>
<TextView
android:id="@+id/poll_amount_voters"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:textColor="@color/low_emphasis_text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/poll_results_list_wrapper"
tools:text="Poll results - 93 votes" />
<com.google.android.material.button.MaterialButton
android:id="@+id/close_vote_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Close"
android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius"
app:layout_constraintEnd_toStartOf="@+id/edit_vote_button"
app:layout_constraintTop_toBottomOf="@+id/poll_results_list_wrapper" />
<com.google.android.material.button.MaterialButton
android:id="@+id/edit_vote_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/edit"
android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/poll_results_list_wrapper" />
</androidx.constraintlayout.widget.ConstraintLayout>