Refactoring , editactivity and state level added
This commit is contained in:
22
app/src/main/res/layout/activity_edit.xml
Normal file
22
app/src/main/res/layout/activity_edit.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/Theme.Beendroid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/sv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:scrollbars="vertical" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -6,27 +6,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.caverock.androidsvg.SVGImageView
|
||||
android:id="@+id/map"
|
||||
|
||||
<com.github.chrisbanes.photoview.PhotoView
|
||||
android:id="@+id/photo_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
app:css="" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/sv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:scrollbars="vertical" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
android:theme="@style/Theme.Beendroid"
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.AboutFragment" >
|
||||
tools:context=".activity.fragment.AboutFragment" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.LicenseFragment" >
|
||||
tools:context=".activity.fragment.LicenseFragment" >
|
||||
|
||||
<fragment
|
||||
android:id="@+id/license_fragment_view"
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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="wrap_content">
|
||||
|
||||
@ -12,39 +13,35 @@
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
app:cornerRadius="0dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetTop="4dp"
|
||||
android:insetBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/text2checkbox"
|
||||
app:layout_constraintEnd_toStartOf="@id/text2checkbox"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/text2checkbox"
|
||||
android:layout_width="0.01dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="start|center_vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/textView"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkBox"
|
||||
app:layout_constraintEnd_toStartOf="@id/checkBox"
|
||||
app:layout_constraintStart_toEndOf="@id/textView" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progressView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkBox"
|
||||
app:layout_constraintEnd_toStartOf="@id/checkBox"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="0.01dp"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
app:checkedState="indeterminate"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/textView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
@ -56,7 +53,7 @@
|
||||
android:id="@+id/sub_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -7,7 +7,6 @@
|
||||
android:id="@+id/action_edit"
|
||||
android:orderInCategory="100"
|
||||
android:icon="@drawable/edit"
|
||||
android:visible="false"
|
||||
android:title="@string/action_edit"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
|
@ -1,9 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.Beendroid" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/teal_700</item>
|
||||
<item name="android:colorPrimary">@color/teal_700</item>
|
||||
<item name="android:panelColorBackground">@color/darkgray</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
||||
<item name="colorAccent">?attr/colorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
@ -1,9 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.Beendroid" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="Theme.Beendroid" parent="Theme.Material3.DayNight">
|
||||
<item name="colorPrimary">@color/teal_700</item>
|
||||
<item name="android:colorPrimary">@color/teal_700</item>
|
||||
<item name="android:panelColorBackground">@color/lightgray</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
||||
<item name="colorAccent">?attr/colorPrimary</item>
|
||||
|
||||
|
||||
<item name="checkboxStyle">@style/Widget.App.CheckBox</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.App.CheckBox" parent="Widget.Material3.CompoundButton.CheckBox">
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -16,14 +16,14 @@
|
||||
<Preference
|
||||
app:enabled="true"
|
||||
app:key="@string/licenses"
|
||||
app:icon="@drawable/checklist"
|
||||
app:icon="@drawable/licenses"
|
||||
app:title="@string/licenses"
|
||||
android:summary="@string/foss_licenses"/>
|
||||
|
||||
<Preference
|
||||
app:enabled="true"
|
||||
app:key="@string/about"
|
||||
app:icon="@drawable/info"
|
||||
app:icon="@drawable/about"
|
||||
app:title="@string/about"
|
||||
android:summary="@string/about_beendroid"/>
|
||||
|
||||
|
Reference in New Issue
Block a user