Skip to content

Commit

Permalink
Merge pull request #1076 from syphyr/align_button
Browse files Browse the repository at this point in the history
Align and format cancel/connect buttons
  • Loading branch information
bitmold authored Jan 29, 2024
2 parents 0757af3 + 8271453 commit f6df19d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
16 changes: 7 additions & 9 deletions app/src/main/res/layout/config_connection_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,23 +265,21 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainGuideline" />


<Button
android:id="@+id/btnAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:layout_marginTop="16dp"
android:text="@string/connect"
android:textColor="@android:color/white"
android:paddingLeft="@dimen/button_horizontal_large_margin"
android:paddingRight="@dimen/button_horizontal_large_margin"

android:background="@drawable/btn_shape_round"
android:backgroundTint="@color/orbot_btn_enabled_purple"
android:text="@string/connect"
android:textColor="@android:color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvCancel"

app:layout_constraintEnd_toEndOf="@id/tvCancel"
app:layout_constraintStart_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainGuideline"
app:layout_goneMarginBottom="20dp" />
app:layout_constraintHorizontal_bias="0.5" />

</androidx.constraintlayout.widget.ConstraintLayout>
18 changes: 12 additions & 6 deletions app/src/main/res/layout/custom_bridge_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@
android:id="@+id/tvCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="144dp"
android:layout_marginTop="28dp"
android:text="@android:string/cancel"
android:textColor="@android:color/white"
android:textStyle="bold"
android:paddingLeft="@dimen/button_horizontal_large_margin"
android:paddingRight="@dimen/button_horizontal_large_margin"
app:layout_constraintEnd_toStartOf="@id/btnAction"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainGuideline" />
Expand All @@ -64,14 +66,18 @@
android:id="@+id/btnAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="128dp"
android:backgroundTint="@color/orbot_btn_enabled_purple"
android:layout_marginTop="16dp"
android:text="@string/connect"
android:enabled="false"
android:textColor="@android:color/white"
android:enabled="false"
android:paddingLeft="@dimen/button_horizontal_large_margin"
android:paddingRight="@dimen/button_horizontal_large_margin"
android:background="@drawable/btn_shape_round"
android:backgroundTint="@color/orbot_btn_enabled_purple"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvCancel"
app:layout_constraintTop_toBottomOf="@id/mainGuideline"
app:layout_goneMarginBottom="20dp" />
app:layout_constraintHorizontal_bias="0.5" />


</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
17 changes: 10 additions & 7 deletions app/src/main/res/layout/moat_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,28 @@
android:text="@android:string/cancel"
android:textColor="@android:color/white"
android:textStyle="bold"
android:paddingLeft="@dimen/button_horizontal_large_margin"
android:paddingRight="@dimen/button_horizontal_large_margin"
app:layout_constraintEnd_toStartOf="@id/btnAction"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/mainGuideline" />


<Button
android:id="@+id/btnAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:backgroundTint="@color/orbot_btn_enabled_purple"
android:layout_marginTop="16dp"
android:text="@string/connect"
android:enabled="false"
android:textColor="@android:color/white"
android:enabled="false"
android:paddingLeft="@dimen/button_horizontal_large_margin"
android:paddingRight="@dimen/button_horizontal_large_margin"
android:background="@drawable/btn_shape_round"
android:backgroundTint="@color/orbot_btn_enabled_purple"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvCancel"
app:layout_constraintTop_toBottomOf="@id/mainGuideline"
app:layout_goneMarginBottom="20dp" />
app:layout_constraintHorizontal_bias="0.5" />


</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit f6df19d

Please sign in to comment.