| | |
| | | import androidx.navigation.fragment.findNavController |
| | | import com.google.android.material.dialog.MaterialAlertDialogBuilder |
| | | import com.example.firstapp.R |
| | | import com.example.firstapp.activity.ContentDetailActivity |
| | | import com.example.firstapp.databinding.FragmentNotificationsBinding |
| | | import com.example.firstapp.ui.reminderOther.ReminderOtherAddActivity2 |
| | | import com.example.firstapp.ui.reminderOther.ReminderSettingsFragmentOther |
| | |
| | | // 分享给好友 |
| | | binding.shareToFriends.setOnClickListener { |
| | | shareToWechat() |
| | | } |
| | | |
| | | // 隐私协议 |
| | | binding.privacyPolicy.setOnClickListener { |
| | | startContentActivity("privacy_policy", "隐私协议") |
| | | } |
| | | |
| | | // 如何使用 |
| | | binding.howToUse.setOnClickListener { |
| | | startContentActivity("user_guide", "使用说明") |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private fun startContentActivity(type: String, title: String) { |
| | | val intent = Intent(requireContext(), ContentDetailActivity::class.java).apply { |
| | | putExtra(ContentDetailActivity.EXTRA_CONTENT_TYPE, type) |
| | | putExtra(ContentDetailActivity.EXTRA_TITLE, title) |
| | | } |
| | | startActivity(intent) |
| | | } |
| | | |
| | | override fun onDestroyView() { |
| | | super.onDestroyView() |
| | | _binding = null |