Skip to content

Commit

Permalink
Fix bug #125 by making the Add/Edit Memory screen scrollable so the b…
Browse files Browse the repository at this point in the history
…uttons can always be reached.
  • Loading branch information
VanceVagell committed Dec 3, 2024
1 parent b4ba69a commit 236cf49
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 143 deletions.
15 changes: 14 additions & 1 deletion android-src/KV4PHT/.idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ private void showScreen(ScreenType screenType) {
} else if (screenType == ScreenType.SCREEN_VOICE){
hideKeyboard();
findViewById(R.id.frequencyContainer).setVisibility(View.VISIBLE);
findViewById(R.id.rxAudioCircle).setVisibility(View.VISIBLE);

if (callsignSnackbar != null) {
callsignSnackbar.dismiss();
Expand Down
288 changes: 146 additions & 142 deletions android-src/KV4PHT/app/src/main/res/layout/activity_add_edit_memory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,157 +35,161 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<com.google.android.material.textfield.TextInputLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="Memory name"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editNameTextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:textColor="@color/primary"
android:inputType="text">
</com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout>
android:orientation="vertical">

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Memory group (optional)"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editMemoryGroupTextInputEditText"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:textColor="@color/primary"
android:inputType="text"/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="Frequency"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editFrequencyTextInputEditText"
android:layout_height="wrap_content"
android:layout_weight="0"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="Memory name"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editNameTextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:textColor="@color/primary"
android:inputType="text">
</com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:inputType="numberDecimal"
android:textColor="@color/primary">
</com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Offset"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editOffsetTextView"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Memory group (optional)"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editMemoryGroupTextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:textColor="@color/primary"
android:inputType="text"/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:inputType="none"
android:text="None"
android:textSize="20dp"
android:textColor="@color/primary"/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="Frequency"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editFrequencyTextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="20dp"
android:inputType="numberDecimal"
android:textColor="@color/primary">
</com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Offset"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editOffsetTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:inputType="none"
android:text="None"
android:textSize="20dp"
android:textColor="@color/primary"/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Tone"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editToneTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:inputType="none"
android:text="None"
android:textSize="20dp"
android:textColor="@color/primary"/>
</com.google.android.material.textfield.TextInputLayout>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:hint="Tone"
app:hintTextColor="@color/primary_deselected"
app:boxStrokeColor="@color/primary"
android:textColorHint="@color/primary_deselected"
android:paddingBottom="16dp">

<AutoCompleteTextView
android:id="@+id/editToneTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:inputType="none"
android:text="None"
android:orientation="horizontal"
android:layout_marginTop="12dp"
android:gravity="right"
android:layout_weight="0">

<Button
android:id="@+id/cancelButton"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_weight="0"
android:background="?android:attr/selectableItemBackground"
android:text="Cancel"
android:textSize="20dp"
android:textColor="@color/primary"/>
</com.google.android.material.textfield.TextInputLayout>

android:textFontWeight="500"
android:textColor="@color/primary"
android:textAllCaps="false"
android:enabled="true"
android:onClick="cancelButtonClicked" />

<Button
android:id="@+id/saveButton"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_weight="0"
android:text="Save"
android:textSize="20dp"
android:textFontWeight="500"
android:textColor="@color/black"
android:textAllCaps="false"
android:enabled="true"
android:onClick="saveButtonClicked"/>
</LinearLayout>
</LinearLayout>

</ScrollView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="12dp"
android:gravity="right"
android:layout_weight="0">

<Button
android:id="@+id/cancelButton"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_weight="0"
android:background="?android:attr/selectableItemBackground"
android:text="Cancel"
android:textSize="20dp"
android:textFontWeight="500"
android:textColor="@color/primary"
android:textAllCaps="false"
android:enabled="true"
android:onClick="cancelButtonClicked" />

<Button
android:id="@+id/saveButton"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_weight="0"
android:text="Save"
android:textSize="20dp"
android:textFontWeight="500"
android:textColor="@color/black"
android:textAllCaps="false"
android:enabled="true"
android:onClick="saveButtonClicked"/>
</LinearLayout>

</LinearLayout>

0 comments on commit 236cf49

Please sign in to comment.