Files
loop/uhabits-android/src/main/res/layout/activity_sync.xml

147 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker 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.
~
~ Loop Habit Tracker 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.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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/highContrastReverseTextColor"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context=".activities.habits.edit.EditHabitActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:gravity="end"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:title="@string/device_sync"
app:titleTextColor="@color/white">
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="4dp"
android:paddingTop="8dp"
android:paddingRight="4dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="4sp"
android:padding="8dp"
android:paddingBottom="16dp"
android:textSize="@dimen/regularTextSize"
android:id="@+id/instructions"
/>
<!-- Sync Link (QR) -->
<FrameLayout style="@style/FormOuterBox">
<LinearLayout
style="@style/FormInnerBox">
<TextView
style="@style/FormLabel"
android:translationZ="0.01dp"
android:text="@string/sync_link_qr" />
<LinearLayout
android:id="@+id/errorPanel"
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/errorIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40dp"
android:layout_margin="40dp"
android:text="@string/fa_exclamation_circle" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Error generating code. Please try again later."
/>
</LinearLayout>
<ProgressBar
android:id="@+id/progress"
android:layout_width="50dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:indeterminate="true"
/>
<ImageView
android:id="@+id/qrCode"
android:layout_margin="10dp"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
/>
</LinearLayout>
</FrameLayout>
<!-- Sync Link -->
<FrameLayout style="@style/FormOuterBox">
<LinearLayout style="@style/FormInnerBox">
<TextView
style="@style/FormLabel"
android:text="@string/sync_link" />
<TextView
android:id="@+id/syncLink"
style="@style/FormInput"
android:singleLine="true"
android:text=""
android:background="@drawable/ripple"
android:textSize="@dimen/smallTextSize"
android:layout_margin="8dp"
/>
</LinearLayout>
</FrameLayout>
</LinearLayout>
</ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>