mirror of https://github.com/ThmmyNoLife/mTHMMY
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
7.7 KiB
173 lines
7.7 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/main_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fitsSystemWindows="true"
|
|
tools:context=".activities.upload.UploadActivity">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/appbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="@dimen/appbar_padding_top"
|
|
android:theme="@style/ToolbarTheme">
|
|
|
|
<androidx.appcompat.widget.Toolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
android:background="?attr/colorPrimary"
|
|
app:popupTheme="@style/ToolbarTheme" />
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:id="@+id/upload_outer_scrollview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="top|start"
|
|
android:background="@color/background"
|
|
android:paddingEnd="@dimen/activity_horizontal_margin"
|
|
android:paddingStart="@dimen/activity_horizontal_margin"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
tools:context="gr.thmmy.mthmmy.activities.upload.UploadActivity">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/background"
|
|
android:focusableInTouchMode="true"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/upload_spinners"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/background"
|
|
android:orientation="vertical">
|
|
|
|
<gr.thmmy.mthmmy.utils.AppCompatSpinnerWithoutDefault
|
|
android:id="@+id/upload_spinner_category_root"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="6dp"
|
|
android:layout_marginTop="6dp"
|
|
android:popupBackground="@color/primary"
|
|
android:prompt="@string/upload_spinners_hint" />
|
|
</LinearLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="6dp"
|
|
android:layout_marginTop="6dp">
|
|
|
|
<EditText
|
|
android:id="@+id/upload_title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/upload_title_hint"
|
|
android:inputType="text"
|
|
android:maxLength="500" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="6dp"
|
|
android:layout_marginTop="6dp">
|
|
|
|
<EditText
|
|
android:id="@+id/upload_description"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/upload_description_hint"
|
|
android:inputType="textMultiLine" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<androidx.appcompat.widget.AppCompatButton
|
|
android:id="@+id/upload_title_description_builder"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="6dp"
|
|
android:gravity="center"
|
|
android:text="@string/upload_title_description_builder"
|
|
android:textAlignment="center"
|
|
android:textColor="@color/accent" />
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
android:id="@+id/upload_filename"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="6dp"
|
|
android:layout_marginTop="6dp"
|
|
android:drawablePadding="5dp"
|
|
android:ellipsize="marquee"
|
|
android:singleLine="true"
|
|
android:textColor="@color/primary_text"
|
|
android:visibility="gone" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<androidx.appcompat.widget.AppCompatButton
|
|
android:id="@+id/upload_select_file_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end"
|
|
android:layout_marginEnd="16dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_vertical"
|
|
android:text="@string/upload_select_file"
|
|
android:textColor="@color/primary_text" />
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<androidx.appcompat.widget.AppCompatButton
|
|
android:id="@+id/upload_take_photo_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end"
|
|
android:layout_marginEnd="16dp"
|
|
android:drawablePadding="5dp"
|
|
android:gravity="center_vertical"
|
|
android:text="@string/upload_take_photo"
|
|
android:textColor="@color/primary_text" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
|
|
android:id="@+id/progressBar"
|
|
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/progress_bar_height"
|
|
android:indeterminate="true"
|
|
android:visibility="invisible"
|
|
app:layout_anchor="@id/appbar"
|
|
app:layout_anchorGravity="bottom|center"
|
|
app:mpb_indeterminateTint="@color/accent"
|
|
app:mpb_progressStyle="horizontal" />
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
android:id="@+id/upload_fab"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom|end"
|
|
android:layout_marginBottom="@dimen/fab_margins"
|
|
android:layout_marginEnd="@dimen/fab_margins"
|
|
app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior"
|
|
app:srcCompat="@drawable/ic_file_upload_white_24dp" />
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|