Skip to content

Commit

Permalink
feat: Set gravity for buttons in PID dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Aug 28, 2023
1 parent 8aff3a3 commit e7757eb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PIDsListPreferenceDialog(private val key: String, private val priority: St
savedInstanceState: Bundle?
): View? {

val root = inflater.inflate(R.layout.dialog_pids_list, container, false)
val root = inflater.inflate(R.layout.dialog_pids, container, false)

when (priority) {
"low" -> findPidDefinitionByPriority { pidDefinition -> pidDefinition.priority > 0 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@

<LinearLayout
android:id="@+id/button_panel"
android:gravity="end"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
Expand All @@ -104,7 +105,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="@string/trip_dialog_close_window"
android:backgroundTint="@color/rainbow_indigo"
android:text="@string/dialog_close_window_action"
android:textSize="12sp"
style="?android:attr/buttonBarButtonStyle" />

Expand All @@ -114,7 +116,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="Save"
android:text="@string/dialog_save_action"
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/dialog_trips.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<LinearLayout
android:id="@+id/button_panel"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
Expand All @@ -95,8 +96,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:backgroundTint="@color/rainbow_indigo"

android:text="@string/trip_dialog_close_window"
android:text="@string/dialog_close_window_action"
android:textSize="12sp"
style="?android:attr/buttonBarButtonStyle" />

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<string name="trip_vehicle_profile">Profile</string>
<string name="trip_action">Action</string>
<string name="trip_action_delete">Del</string>
<string name="trip_dialog_close_window">Close window</string>
<string name="dialog_close_window_action">Close window</string>
<string name="trip_dialog_delete_all_trips">Delete all</string>
<string name="trip_delete_dialog_ask_question">Are you sure you want to Delete?</string>
<string name="trip_delete_dialog_ask_question_yes">Yes</string>
Expand Down Expand Up @@ -300,6 +300,7 @@
<string name="virtual_screen_6">6</string>
<string name="virtual_screen_7">7</string>
<string name="virtual_screen_8">8</string>
<string name="dialog_save_action">Save</string>


<string-array name="pref.numbers_1_20">
Expand Down

0 comments on commit e7757eb

Please sign in to comment.