Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 6203855

Browse files
authored
Restore settings button to onboarding screen (#1119)
Signed-off-by: Harsh Shandilya <[email protected]>
1 parent 56f4ded commit 6203855

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

app/src/main/java/com/zeapo/pwdstore/ui/onboarding/fragments/WelcomeFragment.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55

66
package com.zeapo.pwdstore.ui.onboarding.fragments
77

8+
import android.content.Intent
89
import android.os.Bundle
910
import android.view.View
1011
import androidx.annotation.Keep
1112
import androidx.fragment.app.Fragment
1213
import com.zeapo.pwdstore.R
14+
import com.zeapo.pwdstore.UserPreference
1315
import com.zeapo.pwdstore.databinding.FragmentWelcomeBinding
1416
import com.zeapo.pwdstore.utils.performTransactionWithBackStack
1517
import com.zeapo.pwdstore.utils.viewBinding
@@ -23,5 +25,6 @@ class WelcomeFragment : Fragment(R.layout.fragment_welcome) {
2325
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
2426
super.onViewCreated(view, savedInstanceState)
2527
binding.letsGo.setOnClickListener { parentFragmentManager.performTransactionWithBackStack(CloneFragment.newInstance()) }
28+
binding.settingsButton.setOnClickListener { startActivity(Intent(requireContext(), UserPreference::class.java)) }
2629
}
2730
}

app/src/main/res/layout/fragment_welcome.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@
55
android:background="?attr/colorPrimary"
66
android:orientation="vertical">
77

8+
<com.google.android.material.button.MaterialButton
9+
android:id="@+id/settings_button"
10+
style="@style/Widget.MaterialComponents.Button.TextButton"
11+
android:layout_width="wrap_content"
12+
android:layout_height="wrap_content"
13+
android:layout_alignParentTop="true"
14+
android:layout_alignParentEnd="true"
15+
android:layout_marginEnd="@dimen/activity_horizontal_margin"
16+
android:text="@string/action_settings"
17+
android:textColor="?attr/colorOnPrimary"
18+
app:layout_constraintEnd_toEndOf="parent"
19+
app:layout_constraintTop_toTopOf="parent" />
20+
821
<androidx.appcompat.widget.AppCompatImageView
922
android:id="@+id/app_icon"
1023
android:layout_width="100dp"

0 commit comments

Comments
 (0)