From 6203855b1583dc72bb32062aa655cf5190643a24 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 24 Sep 2020 13:38:14 +0530 Subject: Restore settings button to onboarding screen (#1119) Signed-off-by: Harsh Shandilya --- .../pwdstore/ui/onboarding/fragments/WelcomeFragment.kt | 3 +++ app/src/main/res/layout/fragment_welcome.xml | 13 +++++++++++++ 2 files changed, 16 insertions(+) (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/onboarding/fragments/WelcomeFragment.kt b/app/src/main/java/com/zeapo/pwdstore/ui/onboarding/fragments/WelcomeFragment.kt index 4f4734d4..2ebab29f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/ui/onboarding/fragments/WelcomeFragment.kt +++ b/app/src/main/java/com/zeapo/pwdstore/ui/onboarding/fragments/WelcomeFragment.kt @@ -5,11 +5,13 @@ package com.zeapo.pwdstore.ui.onboarding.fragments +import android.content.Intent import android.os.Bundle import android.view.View import androidx.annotation.Keep import androidx.fragment.app.Fragment import com.zeapo.pwdstore.R +import com.zeapo.pwdstore.UserPreference import com.zeapo.pwdstore.databinding.FragmentWelcomeBinding import com.zeapo.pwdstore.utils.performTransactionWithBackStack import com.zeapo.pwdstore.utils.viewBinding @@ -23,5 +25,6 @@ class WelcomeFragment : Fragment(R.layout.fragment_welcome) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.letsGo.setOnClickListener { parentFragmentManager.performTransactionWithBackStack(CloneFragment.newInstance()) } + binding.settingsButton.setOnClickListener { startActivity(Intent(requireContext(), UserPreference::class.java)) } } } diff --git a/app/src/main/res/layout/fragment_welcome.xml b/app/src/main/res/layout/fragment_welcome.xml index cdf9f0a1..f0dbdf5f 100644 --- a/app/src/main/res/layout/fragment_welcome.xml +++ b/app/src/main/res/layout/fragment_welcome.xml @@ -5,6 +5,19 @@ android:background="?attr/colorPrimary" android:orientation="vertical"> + +