Layout cleanup.
This commit is contained in:
1
Android/.idea/misc.xml
generated
1
Android/.idea/misc.xml
generated
@@ -9,6 +9,7 @@
|
|||||||
<entry key="app/src/main/res/layout/fragment_edit_strings_list_item.xml" value="0.2210144927536232" />
|
<entry key="app/src/main/res/layout/fragment_edit_strings_list_item.xml" value="0.2210144927536232" />
|
||||||
<entry key="app/src/main/res/layout/fragment_edit_traits_list.xml" value="0.2210144927536232" />
|
<entry key="app/src/main/res/layout/fragment_edit_traits_list.xml" value="0.2210144927536232" />
|
||||||
<entry key="app/src/main/res/layout/fragment_edit_traits_list_item.xml" value="0.2210144927536232" />
|
<entry key="app/src/main/res/layout/fragment_edit_traits_list_item.xml" value="0.2210144927536232" />
|
||||||
|
<entry key="app/src/main/res/layout/fragment_search.xml" value="0.16875" />
|
||||||
<entry key="app/src/main/res/layout/simple_list_item.xml" value="0.2210144927536232" />
|
<entry key="app/src/main/res/layout/simple_list_item.xml" value="0.2210144927536232" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class LibraryRecyclerViewAdapter extends ListAdapter<Monster, LibraryRecy
|
|||||||
@NonNull
|
@NonNull
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View view = LayoutInflater.from(parent.getContext())
|
View view = LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.monster_list_content, parent, false);
|
.inflate(R.layout.simple_list_item, parent, false);
|
||||||
return new ViewHolder(view);
|
return new ViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class SearchResultsRecyclerViewAdapter extends RecyclerView.Adapter<Searc
|
|||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View view = LayoutInflater.from(parent.getContext())
|
View view = LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.monster_list_content, parent, false);
|
.inflate(R.layout.simple_list_item, parent, false);
|
||||||
return new ViewHolder(view);
|
return new ViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,5 +31,4 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.0"
|
app:layout_constraintVertical_bias="0.0"
|
||||||
app:navGraph="@navigation/mobile_navigation" />
|
app:navGraph="@navigation/mobile_navigation" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -55,5 +55,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="+5" />
|
tools:text="+5" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -35,6 +35,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
app:layout_constraintTop_toBottomOf="@id/name"
|
||||||
tools:text="Melee Weapon Attack: +8 to hit, reach 10 ft., one target. Hit: 14 (2d8 + 5) bludgeoning damage." />
|
tools:text="Melee Weapon Attack: +8 to hit, reach 10 ft., one target. Hit: 14 (2d8 + 5) bludgeoning damage." />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -31,5 +31,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="17" />
|
tools:text="17" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -31,5 +31,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="1/8" />
|
tools:text="1/8" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -31,5 +31,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="367" />
|
tools:text="367" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -31,5 +31,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="+2" />
|
tools:text="+2" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -169,6 +169,4 @@
|
|||||||
android:layout_marginHorizontal="4dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
|
||||||
android:layout_margin="@dimen/text_margin"
|
|
||||||
tools:context=".ui.components.AdvantagePicker">
|
|
||||||
<!-- // TODO: style this control to look less awful by default -->
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="@dimen/padding_normal"
|
|
||||||
android:layout_marginTop="@dimen/padding_small"
|
|
||||||
android:text="@string/label_advantage"
|
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Body1"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/group"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/label">
|
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
||||||
android:id="@+id/hasNoAdvantage"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
android:layout_marginVertical="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/radio_button_selector"
|
|
||||||
android:button="@android:color/transparent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/label_advantage_none"
|
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Button"
|
|
||||||
android:textColor="@color/radio_button_text"
|
|
||||||
tools:checked="true" />
|
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
||||||
android:id="@+id/hasAdvantage"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
android:layout_marginVertical="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/radio_button_selector"
|
|
||||||
android:button="@android:color/transparent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/label_advantage_advantage"
|
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Button"
|
|
||||||
android:textColor="@color/radio_button_text"
|
|
||||||
tools:checked="false" />
|
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
||||||
android:id="@+id/hasDisadvantage"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
android:layout_marginVertical="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/radio_button_selector"
|
|
||||||
android:button="@android:color/transparent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/label_advantage_disadvantage"
|
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Button"
|
|
||||||
android:textColor="@color/radio_button_text"
|
|
||||||
tools:checked="false" />
|
|
||||||
</RadioGroup>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -184,6 +184,5 @@
|
|||||||
android:text="@string/label_regional_actions"
|
android:text="@string/label_regional_actions"
|
||||||
android:textSize="@dimen/text_h4_size"
|
android:textSize="@dimen/text_h4_size"
|
||||||
app:drawableEndCompat="@drawable/ic_chevron_right_24" />
|
app:drawableEndCompat="@drawable/ic_chevron_right_24" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -167,5 +167,4 @@
|
|||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/text_margin"
|
|
||||||
android:textAppearance="?attr/textAppearanceListItem" />
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
app:layoutManager="LinearLayoutManager"
|
app:layoutManager="LinearLayoutManager"
|
||||||
tools:context=".MonsterListFragment"
|
tools:context=".MonsterListFragment"
|
||||||
tools:listitem="@layout/monster_list_content" />
|
tools:listitem="@layout/simple_list_item" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
|
|||||||
@@ -24,17 +24,15 @@
|
|||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/monster_list"
|
android:id="@+id/monster_list"
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/search_query"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layoutManager="LinearLayoutManager"
|
app:layoutManager="LinearLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/search_query"
|
||||||
tools:context=".SearchResultsFragment"
|
tools:context=".SearchResultsFragment"
|
||||||
tools:listitem="@layout/monster_list_content" />
|
tools:listitem="@layout/simple_list_item" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<!-- // TODO: combine all of these similar list layouts into a single one -->
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/text_margin"
|
|
||||||
android:textAppearance="?attr/textAppearanceListItem" />
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -97,5 +97,4 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="@dimen/padding_normal"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textSize="16sp"
|
android:textSize="@dimen/monster_tile_name_text_size"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -24,10 +24,10 @@
|
|||||||
android:id="@+id/meta"
|
android:id="@+id/meta"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="@dimen/padding_normal"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textSize="10sp"
|
android:textSize="@dimen/monster_tile_meta_text_size"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
android:id="@+id/boxesRow"
|
android:id="@+id/boxesRow"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="@dimen/padding_normal"
|
||||||
android:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/armorClass"
|
android:id="@+id/armorClass"
|
||||||
layout="@layout/card_armor_class"
|
layout="@layout/card_armor_class"
|
||||||
android:layout_width="40dp"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="@dimen/icon_size" />
|
||||||
|
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
@@ -60,8 +60,8 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/hitPoints"
|
android:id="@+id/hitPoints"
|
||||||
layout="@layout/card_hit_points"
|
layout="@layout/card_hit_points"
|
||||||
android:layout_width="40dp"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="@dimen/icon_size" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/initiative"
|
android:id="@+id/initiative"
|
||||||
layout="@layout/card_initiative"
|
layout="@layout/card_initiative"
|
||||||
android:layout_width="40dp"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="@dimen/icon_size" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -82,9 +82,7 @@
|
|||||||
<include
|
<include
|
||||||
android:id="@+id/challengeRating"
|
android:id="@+id/challengeRating"
|
||||||
layout="@layout/card_challenge_rating"
|
layout="@layout/card_challenge_rating"
|
||||||
android:layout_width="40dp"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="@dimen/icon_size" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user