fedilab-Android-App/app/src/main/res/layout/compose_poll.xml

111 lines
4.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2021 Thomas Schneider
This file is a part of Fedilab
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.
Fedilab 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 Fedilab; if not,
see <http://www.gnu.org/licenses>
-->
<com.google.android.material.card.MaterialCardView 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"
android:layout_margin="6dp"
app:cardElevation="2dp">
<ScrollView
android:id="@+id/options_list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/options_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:orientation="vertical">
<include
android:id="@+id/option_1"
layout="@layout/compose_poll_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp" />
<include
android:id="@+id/option_2"
layout="@layout/compose_poll_item" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_add_option"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="6dp"
android:contentDescription="@string/add_poll_item"
android:src="@drawable/ic_baseline_add_24" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/poll_type"
android:textAlignment="viewEnd" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/poll_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/poll_duration"
android:textAlignment="viewEnd" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/poll_duration"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</ScrollView>
</com.google.android.material.card.MaterialCardView>