Skip to content

Commit

Permalink
fix: modify activity settings views
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-95 committed Nov 30, 2021
1 parent 077d490 commit 8f7e4f0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SettingsActivity : AppCompatActivity(), View.OnClickListener {
binding.backImage.setOnClickListener(this)
binding.backText.setOnClickListener(this)
binding.totemSwitch.setOnClickListener(this)
binding.scanButton.setOnClickListener(this)
binding.scanCard.setOnClickListener(this)
binding.faqCard.setOnClickListener(this)
binding.privacyPolicyCard.setOnClickListener(this)
}
Expand Down Expand Up @@ -84,7 +84,7 @@ class SettingsActivity : AppCompatActivity(), View.OnClickListener {
finish()
} else if (v?.id == R.id.totem_switch) {
viewModel.setTotemMode(binding.totemSwitch.isChecked)
} else if (v?.id == R.id.scan_button) {
} else if (v?.id == R.id.scan_card) {
AlertDialogCaller.showScanModeChoiceAlertDialog(
this,
getString(R.string.label_scan_mode),
Expand Down
29 changes: 17 additions & 12 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,24 @@
android:textColor="@color/blue_dark"
android:textStyle="bold" />

<androidx.appcompat.widget.SwitchCompat
android:id="@+id/totem_switch"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="14dp"
android:layout_marginEnd="16dp"
android:fontFamily="@font/titiliumfont"
android:textColor="@color/blue"
android:textSize="@dimen/text_size_14sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
android:layout_height="match_parent" >

<androidx.appcompat.widget.SwitchCompat
android:id="@+id/totem_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:fontFamily="@font/titiliumfont"
android:textColor="@color/blue"
android:textSize="@dimen/text_size_14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>

Expand Down

0 comments on commit 8f7e4f0

Please sign in to comment.