Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
id("kotlin-kapt")
// If you use Kotlin Parcelize, uncomment the next line:
// id("kotlin-parcelize")
id("com.google.android.gms.oss-licenses-plugin")
}

android {
Expand Down Expand Up @@ -122,6 +123,7 @@ android {
dependencies {
val kotlinVersion = "1.9.0"
val materialVersion = "1.12.0"
val ossLicenseVersion = "17.2.1"
val appCompatVersion = "1.7.0"
val roomVersion = "2.7.2"
// val jsonVersion = "20250517"
Expand All @@ -136,6 +138,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")

implementation("com.google.android.material:material:$materialVersion")
implementation("com.google.android.gms:play-services-oss-licenses:$ossLicenseVersion")
implementation("androidx.appcompat:appcompat:$appCompatVersion")
// viewbinding is often not explicitly needed here if buildFeatures.viewBinding = true
// implementation("androidx.databinding:viewbinding:7.4.1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
package com.jeeldobariya.passcodes.ui;
package com.jeeldobariya.passcodes.ui

import android.content.Context
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowCompat;
import com.jeeldobariya.passcodes.databinding.ActivityAboutUsBinding
import com.jeeldobariya.passcodes.utils.Constant

import com.jeeldobariya.passcodes.R
import com.jeeldobariya.passcodes.databinding.ActivityAboutUsBinding;
import com.jeeldobariya.passcodes.utils.Constant;
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity

public class AboutUsActivity : AppCompatActivity() {
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.net.toUri

class AboutUsActivity : AppCompatActivity() {

private lateinit var binding: ActivityAboutUsBinding

override fun onCreate(savedInstanceState: Bundle?) {
val sharedPrefs = getSharedPreferences(SettingsActivity.THEME_PREFS_NAME, Context.MODE_PRIVATE)
val savedThemeStyle = sharedPrefs.getInt(SettingsActivity.THEME_KEY, R.style.PasscodesTheme_Default)
setTheme(savedThemeStyle)

super.onCreate(savedInstanceState);
binding = ActivityAboutUsBinding.inflate(layoutInflater);
setContentView(binding.root);

// Add event onclick listener
addOnClickListenerOnButton();

// Make window fullscreen
WindowCompat.setDecorFitsSystemWindows(window, false);
super.onCreate(savedInstanceState)
binding = ActivityAboutUsBinding.inflate(layoutInflater)
setContentView(binding.root)

binding.toolbar.setNavigationOnClickListener {
onBackPressedDispatcher.onBackPressed()
}

// Set up button click listeners
setupButtonListeners()
}

private fun openBrowser(url: String) {
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
val browserIntent = Intent(Intent.ACTION_VIEW, url.toUri())
startActivity(browserIntent)
}

// Added all the onclick event listiners
private fun addOnClickListenerOnButton() {
binding.viewSecurityGuidelinesBtn.setOnClickListener {
openBrowser(Constant.SECURITY_GUIDE_URL);
};
private fun setupButtonListeners() {
binding.cardSecurityGuidelines.setOnClickListener {
openBrowser(Constant.SECURITY_GUIDE_URL)
}

binding.cardChangeLog.setOnClickListener {
openBrowser(Constant.CHANGELOG_URL)
}

binding.viewChangeLogBtn.setOnClickListener {
openBrowser(Constant.CHANGELOG_URL);
};
binding.cardLicense.setOnClickListener {
startActivity(Intent(this, OssLicensesMenuActivity::class.java))
}

binding.viewLicenseBtn.setOnClickListener {
openBrowser(Constant.LICENSE_URL);
};
binding.cardReportBug.setOnClickListener {
openBrowser(Constant.REPORT_BUG_URL)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.jeeldobariya.passcodes.utils

object Constant {
const val REPO_URL = "https://github.com/JeelDobariya38/Passcodes"
const val LICENSE_URL = "https://github.com/JeelDobariya38/Passcodes/blob/main/LICENSE.txt"
const val REPORT_BUG_URL = "https://github.com/JeelDobariya38/password-manager/issues/new?template=bug-report.md"
const val CHANGELOG_URL = "https://github.com/JeelDobariya38/Passcodes/blob/main/changelog.md"
const val SECURITY_GUIDE_URL = "https://github.com/JeelDobariya38/Passcodes/blob/main/docs/security_guide.md"
}
Binary file added app/src/main/res/drawable/ic_article.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ic_bug_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ic_history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ic_security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading