Skip to content

Commit

Permalink
dev about dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaji Khan committed Mar 12, 2024
1 parent cf64f27 commit a6311a0
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 19 deletions.
15 changes: 1 addition & 14 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ plugins {
}

android {
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "com.shajikhan.ladspa.amprack"
minSdk 24
targetSdk 33
versionCode 76
versionName '3.97'
versionCode 77
versionName '3.98'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
Expand Down Expand Up @@ -90,6 +90,8 @@ android {

dependencies {
// Import the BoM for the Firebase platform
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))

implementation 'com.google.gms:google-services:4.3.10'
implementation platform('com.google.firebase:firebase-bom:29.2.1')
implementation 'com.google.firebase:firebase-auth'
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:theme="@style/Theme.MySplash">
<activity
android:name=".About"
android:theme="@style/Theme.AmpRack"
android:exported="false" />
<activity
android:name=".Camera"
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/java/com/shajikhan/ladspa/amprack/About.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.shajikhan.ladspa.amprack;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -15,6 +19,27 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_about);
getSupportActionBar().hide();
Button music = findViewById(R.id.music);
music.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("https://music.shaji.in"));
startActivity(i);
}
});

Button github = findViewById(R.id.github);
github.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("https://github.com/djshaji"));
startActivity(i);
}
});

ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3201,4 +3201,10 @@ public void onNothingSelected(AdapterView<?> adapterView) {

builder.show();
}

public static void about () {
Intent intent = new Intent(mainActivity, About.class);
mainActivity.startActivity(intent);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ public boolean onPreferenceClick(Preference preference) {
return false;
}
});

findPreference("build_name").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
MainActivity.about();
return false;
}
});
findPreference("build_name").setSummary(R.string.app_version);
// int plugins = AudioEngine.getTotalPlugins() ;
int plugins = MainActivity.totalPlugins;
Expand Down
19 changes: 17 additions & 2 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
android:src="@drawable/dev"/>

<TextView
android:layout_margin="10dp"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:gravity="center"
android:fontFamily="@font/comfortaa"
Expand Down Expand Up @@ -93,16 +93,31 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/comfortaa"
android:id="@+id/music"
android:layout_margin="5dp"
android:text="My Music"/>
android:text="Music"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:id="@+id/github"
android:fontFamily="@font/comfortaa"
android:text="Github"/>
</LinearLayout>

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:text="@string/about_dev"
android:fontFamily="@font/comfortaa"
android:layout_margin="5dp"
android:padding="5dp"
android:textAlignment="center"
android:layout_height="wrap_content"/>
</ScrollView>

</LinearLayout>
</LinearLayout>

Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
Android Material Design, or Tube Amp theme based on the new
skin engine.
</string>
<string name="about_dev">
Open Source Audio Engineer. I love to write code, make music, travel and read.\n\n
shaji.in
</string>
<string-array name="tap_plugins">
<item>tap_autopan.so</item>
<item>tap_chorusflanger.so</item>
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ plugins {
id 'com.android.application' version '8.3.0' apply false
id 'com.android.library' version '8.3.0' apply false
id 'com.google.gms.google-services' version '4.3.10' apply false

// id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}

Expand Down

0 comments on commit a6311a0

Please sign in to comment.