Adds a Stepper control and uses it for the steppers in the editor.
This commit is contained in:
		| @@ -13,11 +13,11 @@ import androidx.annotation.Nullable; | ||||
| import androidx.constraintlayout.widget.ConstraintLayout; | ||||
|  | ||||
| import com.majinnaibu.monstercards.R; | ||||
| import com.majinnaibu.monstercards.utils.Logger; | ||||
|  | ||||
| import java.util.Objects; | ||||
|  | ||||
|  | ||||
| @SuppressWarnings("unused") | ||||
| public class Stepper extends ConstraintLayout { | ||||
|     private final ViewHolder mHolder; | ||||
|     private int mCurrentValue; | ||||
| @@ -46,7 +46,6 @@ public class Stepper extends ConstraintLayout { | ||||
|         mHolder = new ViewHolder(root); | ||||
|  | ||||
|         setValue(mCurrentValue); | ||||
|         updateDisplayedValue(); | ||||
|         mHolder.increment.setOnClickListener(v -> setValue(mCurrentValue + mStep)); | ||||
|         mHolder.decrement.setOnClickListener(v -> setValue(mCurrentValue - mStep)); | ||||
|  | ||||
| @@ -75,22 +74,19 @@ public class Stepper extends ConstraintLayout { | ||||
|     public void setValue(int value) { | ||||
|         int oldValue = this.mCurrentValue; | ||||
|         int newValue = Math.min(mMaxValue, Math.max(mMinValue, value)); | ||||
|         Logger.logDebug(String.format("Setting stepper value value: %d, oldValue: %d, newValue: %d", value, oldValue, newValue)); | ||||
|         if (newValue != oldValue) { | ||||
|             this.mCurrentValue = newValue; | ||||
|             if (mOnValueChangeListener != null) { | ||||
|                 mOnValueChangeListener.onChange(newValue, oldValue); | ||||
|             } | ||||
|             updateDisplayedValue(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private void updateDisplayedValue() { | ||||
|             if (mOnFormatValueCallback != null) { | ||||
|                 mHolder.text.setText(mOnFormatValueCallback.onFormatValue(this.mCurrentValue)); | ||||
|             } else { | ||||
|                 mHolder.text.setText(String.valueOf(this.mCurrentValue)); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public void setOnValueChangeListener(OnValueChangeListener listener) { | ||||
|         mOnValueChangeListener = listener; | ||||
| @@ -98,7 +94,6 @@ public class Stepper extends ConstraintLayout { | ||||
|  | ||||
|     public void setOnFormatValueCallback(OnFormatValueCallback callback) { | ||||
|         mOnFormatValueCallback = callback; | ||||
|         updateDisplayedValue(); | ||||
|     } | ||||
|  | ||||
|     public int getStep() { | ||||
| @@ -139,7 +134,7 @@ public class Stepper extends ConstraintLayout { | ||||
|         final Button increment; | ||||
|         final Button decrement; | ||||
|  | ||||
|         ViewHolder(@NonNull View root) { | ||||
|         ViewHolder(View root) { | ||||
|             text = root.findViewById(R.id.text); | ||||
|             label = root.findViewById(R.id.label); | ||||
|             increment = root.findViewById(R.id.increment); | ||||
|   | ||||
| @@ -4,8 +4,6 @@ import android.os.Bundle; | ||||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.Button; | ||||
| import android.widget.TextView; | ||||
|  | ||||
| import androidx.fragment.app.Fragment; | ||||
| import androidx.lifecycle.ViewModelProvider; | ||||
| @@ -14,11 +12,17 @@ import androidx.navigation.NavController; | ||||
| import androidx.navigation.Navigation; | ||||
|  | ||||
| import com.majinnaibu.monstercards.R; | ||||
| import com.majinnaibu.monstercards.ui.components.Stepper; | ||||
|  | ||||
| public class EditAbilityScoresFragment extends Fragment { | ||||
|     private final String ABILITY_SCORE_FORMAT = "%d (%+d)"; | ||||
|     private EditMonsterViewModel mViewModel; | ||||
|     private ViewHolder mHolder; | ||||
|  | ||||
|     private int getModifier(int value) { | ||||
|         return value / 2 - 5; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||||
|                              Bundle savedInstanceState) { | ||||
| @@ -31,72 +35,48 @@ public class EditAbilityScoresFragment extends Fragment { | ||||
|  | ||||
|         mHolder = new ViewHolder(root); | ||||
|  | ||||
|         mViewModel.getStrength().observe(getViewLifecycleOwner(), value -> mHolder.strength.setText(String.valueOf(value))); | ||||
|         mHolder.increaseStrength.setOnClickListener(v -> mViewModel.incrementStrength()); | ||||
|         mHolder.decreaseStrength.setOnClickListener(v -> mViewModel.decrementStrength()); | ||||
|         mViewModel.getStrength().observe(getViewLifecycleOwner(), value -> mHolder.strength.setValue(value)); | ||||
|         mHolder.strength.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setStrength(newValue)); | ||||
|         mHolder.strength.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         mViewModel.getDexterity().observe(getViewLifecycleOwner(), value -> mHolder.dexterity.setText(String.valueOf(value))); | ||||
|         mHolder.increaseDexterity.setOnClickListener(v -> mViewModel.incrementDexterity()); | ||||
|         mHolder.decreaseDexterity.setOnClickListener(v -> mViewModel.decrementDexterity()); | ||||
|         mViewModel.getDexterity().observe(getViewLifecycleOwner(), value -> mHolder.dexterity.setValue(value)); | ||||
|         mHolder.dexterity.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setDexterity(newValue)); | ||||
|         mHolder.dexterity.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         mViewModel.getConstitution().observe(getViewLifecycleOwner(), value -> mHolder.constitution.setText(String.valueOf(value))); | ||||
|         mHolder.increaseConstitution.setOnClickListener(v -> mViewModel.incrementConstitution()); | ||||
|         mHolder.decreaseConstitution.setOnClickListener(v -> mViewModel.decrementConstitution()); | ||||
|         mViewModel.getConstitution().observe(getViewLifecycleOwner(), value -> mHolder.constitution.setValue(value)); | ||||
|         mHolder.constitution.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setConstitution(newValue)); | ||||
|         mHolder.constitution.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         mViewModel.getIntelligence().observe(getViewLifecycleOwner(), value -> mHolder.intelligence.setText(String.valueOf(value))); | ||||
|         mHolder.increaseIntelligence.setOnClickListener(v -> mViewModel.incrementIntelligence()); | ||||
|         mHolder.decreaseIntelligence.setOnClickListener(v -> mViewModel.decrementIntelligence()); | ||||
|         mViewModel.getIntelligence().observe(getViewLifecycleOwner(), value -> mHolder.intelligence.setValue(value)); | ||||
|         mHolder.intelligence.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setIntelligence(newValue)); | ||||
|         mHolder.intelligence.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         mViewModel.getWisdom().observe(getViewLifecycleOwner(), value -> mHolder.wisdom.setText(String.valueOf(value))); | ||||
|         mHolder.increaseWisdom.setOnClickListener(v -> mViewModel.incrementWisdom()); | ||||
|         mHolder.decreaseWisdom.setOnClickListener(v -> mViewModel.decrementWisdom()); | ||||
|         mViewModel.getWisdom().observe(getViewLifecycleOwner(), value -> mHolder.wisdom.setValue(value)); | ||||
|         mHolder.wisdom.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setWisdom(newValue)); | ||||
|         mHolder.wisdom.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         mViewModel.getCharisma().observe(getViewLifecycleOwner(), value -> mHolder.charisma.setText(String.valueOf(value))); | ||||
|         mHolder.increaseCharisma.setOnClickListener(v -> mViewModel.incrementCharisma()); | ||||
|         mHolder.decreaseCharisma.setOnClickListener(v -> mViewModel.decrementCharisma()); | ||||
|         mViewModel.getCharisma().observe(getViewLifecycleOwner(), value -> mHolder.charisma.setValue(value)); | ||||
|         mHolder.charisma.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setCharisma(newValue)); | ||||
|         mHolder.charisma.setOnFormatValueCallback(value -> String.format(ABILITY_SCORE_FORMAT, value, getModifier(value))); | ||||
|  | ||||
|         return root; | ||||
|     } | ||||
|  | ||||
|     private static class ViewHolder { | ||||
|         TextView strength; | ||||
|         Button decreaseStrength; | ||||
|         Button increaseStrength; | ||||
|         TextView dexterity; | ||||
|         Button increaseDexterity; | ||||
|         Button decreaseDexterity; | ||||
|         TextView constitution; | ||||
|         Button increaseConstitution; | ||||
|         Button decreaseConstitution; | ||||
|         TextView intelligence; | ||||
|         Button increaseIntelligence; | ||||
|         Button decreaseIntelligence; | ||||
|         TextView wisdom; | ||||
|         Button increaseWisdom; | ||||
|         Button decreaseWisdom; | ||||
|         TextView charisma; | ||||
|         Button increaseCharisma; | ||||
|         Button decreaseCharisma; | ||||
|         final Stepper strength; | ||||
|         final Stepper dexterity; | ||||
|         final Stepper constitution; | ||||
|         final Stepper intelligence; | ||||
|         final Stepper wisdom; | ||||
|         final Stepper charisma; | ||||
|  | ||||
|         ViewHolder(View root) { | ||||
|             strength = root.findViewById(R.id.strength); | ||||
|             increaseStrength = root.findViewById(R.id.strength_increment); | ||||
|             decreaseStrength = root.findViewById(R.id.strength_decrement); | ||||
|             dexterity = root.findViewById(R.id.dexterity); | ||||
|             increaseDexterity = root.findViewById(R.id.dexterity_increment); | ||||
|             decreaseDexterity = root.findViewById(R.id.dexterity_decrement); | ||||
|             constitution = root.findViewById(R.id.constitution); | ||||
|             increaseConstitution = root.findViewById(R.id.constitution_increment); | ||||
|             decreaseConstitution = root.findViewById(R.id.constitution_decrement); | ||||
|             intelligence = root.findViewById(R.id.intelligence); | ||||
|             increaseIntelligence = root.findViewById(R.id.intelligence_increment); | ||||
|             decreaseIntelligence = root.findViewById(R.id.intelligence_decrement); | ||||
|             wisdom = root.findViewById(R.id.wisdom); | ||||
|             increaseWisdom = root.findViewById(R.id.wisdom_increment); | ||||
|             decreaseWisdom = root.findViewById(R.id.wisdom_decrement); | ||||
|             charisma = root.findViewById(R.id.charisma); | ||||
|             increaseCharisma = root.findViewById(R.id.charisma_increment); | ||||
|             decreaseCharisma = root.findViewById(R.id.charisma_decrement); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -4,9 +4,7 @@ import android.os.Bundle; | ||||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.Button; | ||||
| import android.widget.EditText; | ||||
| import android.widget.TextView; | ||||
|  | ||||
| import androidx.appcompat.widget.SwitchCompat; | ||||
| import androidx.fragment.app.Fragment; | ||||
| @@ -16,6 +14,7 @@ import androidx.navigation.NavController; | ||||
| import androidx.navigation.Navigation; | ||||
|  | ||||
| import com.majinnaibu.monstercards.R; | ||||
| import com.majinnaibu.monstercards.ui.components.Stepper; | ||||
| import com.majinnaibu.monstercards.utils.TextChangedListener; | ||||
|  | ||||
| public class EditSpeedFragment extends Fragment { | ||||
| @@ -34,29 +33,25 @@ public class EditSpeedFragment extends Fragment { | ||||
|  | ||||
|         mHolder = new ViewHolder(root); | ||||
|  | ||||
|         mViewModel.getWalkSpeed().observe(getViewLifecycleOwner(), value -> { | ||||
|             mHolder.baseSpeed.setText(String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         }); | ||||
|         mHolder.incrementBaseSpeed.setOnClickListener(v -> mViewModel.incrementWalkSpeed()); | ||||
|         mHolder.decrementBaseSpeed.setOnClickListener(v -> mViewModel.decrementWalkSpeed()); | ||||
|         mHolder.baseSpeed.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setWalkSpeed(newValue)); | ||||
|         mHolder.baseSpeed.setOnFormatValueCallback(value -> String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         mViewModel.getWalkSpeed().observe(getViewLifecycleOwner(), value -> mHolder.baseSpeed.setValue(value)); | ||||
|  | ||||
|         mViewModel.getBurrowSpeed().observe(getViewLifecycleOwner(), value -> { | ||||
|             mHolder.burrowSpeed.setText(String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         }); | ||||
|         mHolder.incrementBurrowSpeed.setOnClickListener(v -> mViewModel.incrementBurrowSpeed()); | ||||
|         mHolder.decrementBurrowSpeed.setOnClickListener(v -> mViewModel.decrementBurrowSpeed()); | ||||
|         mHolder.burrowSpeed.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setBurrowSpeed(newValue)); | ||||
|         mHolder.burrowSpeed.setOnFormatValueCallback(value -> String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         mViewModel.getBurrowSpeed().observe(getViewLifecycleOwner(), value -> mHolder.burrowSpeed.setValue(value)); | ||||
|  | ||||
|         mViewModel.getClimbSpeed().observe(getViewLifecycleOwner(), value -> mHolder.climbSpeed.setText(String.format(getString(R.string.format_distance_in_feet), value))); | ||||
|         mHolder.incrementClimbSpeed.setOnClickListener(v -> mViewModel.incrementClimbSpeed()); | ||||
|         mHolder.decrementBurrowSpeed.setOnClickListener(v -> mViewModel.decrementClimbSpeed()); | ||||
|         mHolder.climbSpeed.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setClimbSpeed(newValue)); | ||||
|         mHolder.climbSpeed.setOnFormatValueCallback(value -> String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         mViewModel.getClimbSpeed().observe(getViewLifecycleOwner(), value -> mHolder.climbSpeed.setValue(value)); | ||||
|  | ||||
|         mViewModel.getFlySpeed().observe(getViewLifecycleOwner(), value -> mHolder.flySpeed.setText(String.format(getString(R.string.format_distance_in_feet), value))); | ||||
|         mHolder.incrementFlySpeed.setOnClickListener(v -> mViewModel.incrementFlySpeed()); | ||||
|         mHolder.decrementBurrowSpeed.setOnClickListener(v -> mViewModel.decrementFlySpeed()); | ||||
|         mHolder.flySpeed.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setFlySpeed(newValue)); | ||||
|         mHolder.flySpeed.setOnFormatValueCallback(value -> String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         mViewModel.getFlySpeed().observe(getViewLifecycleOwner(), value -> mHolder.flySpeed.setValue(value)); | ||||
|  | ||||
|         mViewModel.getSwimSpeed().observe(getViewLifecycleOwner(), value -> mHolder.swimSpeed.setText(String.format(getString(R.string.format_distance_in_feet), value))); | ||||
|         mHolder.incrementSwimSpeed.setOnClickListener(v -> mViewModel.incrementSwimSpeed()); | ||||
|         mHolder.decrementBurrowSpeed.setOnClickListener(v -> mViewModel.decrementSwimSpeed()); | ||||
|         mHolder.swimSpeed.setOnValueChangeListener((newValue, oldValue) -> mViewModel.setSwimSpeed(newValue)); | ||||
|         mHolder.swimSpeed.setOnFormatValueCallback(value -> String.format(getString(R.string.format_distance_in_feet), value)); | ||||
|         mViewModel.getSwimSpeed().observe(getViewLifecycleOwner(), value -> mHolder.swimSpeed.setValue(value)); | ||||
|  | ||||
|         mViewModel.getCanHover().observe(getViewLifecycleOwner(), value -> mHolder.canHover.setChecked(value)); | ||||
|         mHolder.canHover.setOnCheckedChangeListener((buttonView, isChecked) -> mViewModel.setCanHover(isChecked)); | ||||
| @@ -73,41 +68,21 @@ public class EditSpeedFragment extends Fragment { | ||||
|  | ||||
|     private static class ViewHolder { | ||||
|  | ||||
|         final TextView baseSpeed; | ||||
|         final Button incrementBaseSpeed; | ||||
|         final Button decrementBaseSpeed; | ||||
|         final TextView burrowSpeed; | ||||
|         final Button incrementBurrowSpeed; | ||||
|         final Button decrementBurrowSpeed; | ||||
|         final TextView climbSpeed; | ||||
|         final Button incrementClimbSpeed; | ||||
|         final Button decrementClimbSpeed; | ||||
|         final TextView flySpeed; | ||||
|         final Button incrementFlySpeed; | ||||
|         final Button decrementFlySpeed; | ||||
|         final TextView swimSpeed; | ||||
|         final Button incrementSwimSpeed; | ||||
|         final Button decrementSwimSpeed; | ||||
|         final Stepper baseSpeed; | ||||
|         final Stepper burrowSpeed; | ||||
|         final Stepper climbSpeed; | ||||
|         final Stepper flySpeed; | ||||
|         final Stepper swimSpeed; | ||||
|         final SwitchCompat canHover; | ||||
|         final SwitchCompat hasCustomSpeed; | ||||
|         final EditText customSpeed; | ||||
|  | ||||
|         ViewHolder(View root) { | ||||
|             baseSpeed = root.findViewById(R.id.baseSpeed); | ||||
|             incrementBaseSpeed = root.findViewById(R.id.baseSpeed_increment); | ||||
|             decrementBaseSpeed = root.findViewById(R.id.baseSpeed_decrement); | ||||
|             burrowSpeed = root.findViewById(R.id.burrowSpeed); | ||||
|             incrementBurrowSpeed = root.findViewById(R.id.burrowSpeed_increment); | ||||
|             decrementBurrowSpeed = root.findViewById(R.id.burrowSpeed_decrement); | ||||
|             climbSpeed = root.findViewById(R.id.climbSpeed); | ||||
|             incrementClimbSpeed = root.findViewById(R.id.climbSpeed_increment); | ||||
|             decrementClimbSpeed = root.findViewById(R.id.climbSpeed_decrement); | ||||
|             flySpeed = root.findViewById(R.id.flySpeed); | ||||
|             incrementFlySpeed = root.findViewById(R.id.flySpeed_increment); | ||||
|             decrementFlySpeed = root.findViewById(R.id.flySpeed_decrement); | ||||
|             swimSpeed = root.findViewById(R.id.swimSpeed); | ||||
|             incrementSwimSpeed = root.findViewById(R.id.swimSpeed_increment); | ||||
|             decrementSwimSpeed = root.findViewById(R.id.swimSpeed_decrement); | ||||
|             canHover = root.findViewById(R.id.canHover); | ||||
|             hasCustomSpeed = root.findViewById(R.id.hasCustomSpeed); | ||||
|             customSpeed = root.findViewById(R.id.customSpeed); | ||||
|   | ||||
| @@ -3,41 +3,14 @@ | ||||
|     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_height="match_parent" | ||||
|     android:layout_margin="@dimen/text_margin" | ||||
|     tools:context=".ui.components.Stepper"> | ||||
|  | ||||
|     <!-- // TODO: Make these text views use the size and appearance of the material text input --> | ||||
|     <TextView | ||||
|         android:id="@+id/text" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingHorizontal="4dp" | ||||
|         android:paddingTop="4dp" | ||||
|         android:paddingBottom="11dp" | ||||
|         android:textAppearance="@android:style/TextAppearance.Material.Medium" | ||||
|         android:textStyle="bold" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toBottomOf="@id/label" | ||||
|         tools:text="20 (+5)" /> | ||||
|  | ||||
|     <TextView | ||||
|         android:id="@+id/label" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="" | ||||
|         android:textAppearance="@android:style/TextAppearance.Material.Caption" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         tools:text="Strength" /> | ||||
|  | ||||
|     <!-- | ||||
|           <TextView | ||||
|                 android:id="@+id/text" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Body1" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
| @@ -48,18 +21,15 @@ | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text="" | ||||
|                 android:textAppearance="@android:style/TextAppearance.Material.Caption" | ||||
|         android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         tools:text="Strength" /> | ||||
|         android:layout_marginTop="8dp" | ||||
|             --> | ||||
|  | ||||
|     <Button | ||||
|         android:id="@+id/decrement" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingVertical="8dp" | ||||
|         android:text="@string/label_decrement_field" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toStartOf="@id/increment" | ||||
| @@ -69,7 +39,6 @@ | ||||
|         android:id="@+id/increment" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingVertical="8dp" | ||||
|         android:text="@string/label_increment_field" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toEndOf="parent" | ||||
|   | ||||
| @@ -11,259 +11,64 @@ | ||||
|         android:layout_height="wrap_content" | ||||
|         android:orientation="vertical"> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/strength" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_strength" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/strength_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/strength_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/strength_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_strength" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/dexterity" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_dexterity" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/dexterity_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/dexterity_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/dexterity_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_dexterity" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/constitution" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_constitution" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/constitution_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/constitution_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/constitution_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_constitution" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/intelligence" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_intelligence" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/intelligence_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/intelligence_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/intelligence_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_intelligence" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/wisdom" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_wisdom" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/wisdom_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/wisdom_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/wisdom_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_wisdom" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/charisma" | ||||
|                 android:layout_width="wrap_content" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_charisma" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/charisma_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/charisma_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/charisma_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_charisma" | ||||
|             app:maxValue="99" | ||||
|             app:minValue="1" | ||||
|             app:stepAmount="1" /> | ||||
|     </LinearLayout> | ||||
| </ScrollView> | ||||
|   | ||||
| @@ -11,215 +11,55 @@ | ||||
|         android:layout_height="wrap_content" | ||||
|         android:orientation="vertical"> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/baseSpeed" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_base_speed" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/baseSpeed_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/baseSpeed_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/baseSpeed_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_base_speed" | ||||
|             app:maxValue="1000" | ||||
|             app:minValue="0" | ||||
|             app:stepAmount="5" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/burrowSpeed" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_burrow_speed" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/burrowSpeed_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/burrowSpeed_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/burrowSpeed_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_burrow_speed" | ||||
|             app:maxValue="1000" | ||||
|             app:minValue="0" | ||||
|             app:stepAmount="5" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/climbSpeed" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_climb_speed" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/climbSpeed_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/climbSpeed_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/climbSpeed_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_climb_speed" | ||||
|             app:maxValue="1000" | ||||
|             app:minValue="0" | ||||
|             app:stepAmount="5" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/flySpeed" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="Fly Speed" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/flySpeed_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/flySpeed_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/flySpeed_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|  | ||||
|         <androidx.constraintlayout.widget.ConstraintLayout | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_margin="@dimen/text_margin"> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_fly_speed" | ||||
|             app:maxValue="1000" | ||||
|             app:minValue="0" | ||||
|             app:stepAmount="5" /> | ||||
|  | ||||
|             <TextView | ||||
|         <com.majinnaibu.monstercards.ui.components.Stepper | ||||
|             android:id="@+id/swimSpeed" | ||||
|                 android:layout_width="wrap_content" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="20 ft." /> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:textAppearance="?attr/textAppearanceSubtitle1" | ||||
|                 app:layout_constraintStart_toStartOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" | ||||
|                 tools:text="Swim Speed" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/swimSpeed_decrement" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_decrement_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toStartOf="@id/swimSpeed_increment" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|             <Button | ||||
|                 android:id="@+id/swimSpeed_increment" | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:text="@string/label_increment_field" | ||||
|                 app:layout_constraintBottom_toBottomOf="parent" | ||||
|                 app:layout_constraintEnd_toEndOf="parent" | ||||
|                 app:layout_constraintTop_toTopOf="parent" /> | ||||
|  | ||||
|         </androidx.constraintlayout.widget.ConstraintLayout> | ||||
|             android:layout_margin="@dimen/text_margin" | ||||
|             app:label="@string/label_swim_speed" | ||||
|             app:maxValue="1000" | ||||
|             app:minValue="0" | ||||
|             app:stepAmount="5" /> | ||||
|  | ||||
|         <com.google.android.material.switchmaterial.SwitchMaterial | ||||
|             android:id="@+id/canHover" | ||||
|   | ||||
| @@ -1,14 +1,9 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <resources> | ||||
|     <attr name="label" format="string" localization="suggested" /> | ||||
|  | ||||
|     <declare-styleable name="Stepper"> | ||||
|         <attr name="stepAmount" format="integer" /> | ||||
|         <attr name="minValue" format="integer" /> | ||||
|         <attr name="maxValue" format="integer" /> | ||||
|         <attr name="label" /> | ||||
|     </declare-styleable> | ||||
|     <declare-styleable name="AbilityScorePicker"> | ||||
|         <attr name="label" /> | ||||
|         <attr name="label" format="string" localization="suggested" /> | ||||
|     </declare-styleable> | ||||
| </resources> | ||||
| @@ -65,5 +65,7 @@ | ||||
|     <string name="title_library">Library</string> | ||||
|     <string name="title_search">Search</string> | ||||
|     <string name="wisdom_abbreviation">WIS</string> | ||||
|     <string name="label_fly_speed">Fly Speed</string> | ||||
|     <string name="label_swim_speed">Swim Speed</string> | ||||
|  | ||||
| </resources> | ||||
		Reference in New Issue
	
	Block a user
	 Tom Hicks
						Tom Hicks