Skip to content

Commit

Permalink
About Settings Activity
Browse files Browse the repository at this point in the history
- about info added
- report a bug button
- rate this app button
  • Loading branch information
devarshukani committed Nov 21, 2023
1 parent 967622a commit 9a62243
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,67 @@

import androidx.appcompat.app.AppCompatActivity;

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

import com.devarshukani.clearmindlauncher.Helper.AnimateLinearLayoutButton;
import com.devarshukani.clearmindlauncher.R;

public class AboutSettingsActivity extends AppCompatActivity {

LinearLayout ButtonReportBug, ButtonFeedback;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about_settings);

ButtonReportBug = findViewById(R.id.ButtonReportBug);
ButtonFeedback = findViewById(R.id.ButtonFeedback);

AnimateLinearLayoutButton anim = new AnimateLinearLayoutButton();


ButtonFeedback.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
anim.animateButtonClick(ButtonFeedback);

String appPackageName = getPackageName();

try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException e) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
}
}
});


ButtonReportBug.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
anim.animateButtonClick(ButtonReportBug);

String email = "connect.dreamwave@gmail.com";
String subject = "Bug Report - ClearMind Launcher";
String body = "Dear ClearMind Support Team,\n\nI encountered the following issue:\n[Describe the bug in detail here, attach screenshots if possible]\n\nSteps to reproduce the bug:\n1. \n2. \n3. \n\nDevice Information:\n- Device: [Your Device Model]\n- OS Version: [Your Android Version]\n\nYour prompt attention to this matter would be greatly appreciated.\n\nSincerely,\n[Your Name]";

String uriText = "mailto:" + Uri.encode(email) +
"?subject=" + Uri.encode(subject) +
"&body=" + Uri.encode(body);

Uri uri = Uri.parse(uriText);

Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(uri);

startActivity(intent);
}
});

}
}
87 changes: 84 additions & 3 deletions app/src/main/res/layout/activity_about_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,89 @@
android:textColor="@color/PrimaryTextColor"
android:layout_marginTop="30dp"/>


<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="About App"
android:fontFamily="@font/sf_pro_display_regular"
android:textStyle="bold"
android:textColor="@color/PrimaryTextColor"
android:layout_marginTop="25dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="ClearMind Launcher is a lightweight and customizable Android launcher designed to provide a clutter-free and focused home screen experience. It aims to help users declutter their digital lives and focus on what matters most."
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="@color/SecondaryTextColor"
android:layout_marginBottom="15dp"
android:justificationMode="inter_word"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="About Developer"
android:fontFamily="@font/sf_pro_display_regular"
android:textStyle="bold"
android:textColor="@color/PrimaryTextColor"
android:layout_marginTop="0dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="ClearMind Launcher, an ingenious creation by an individual developer based in India, reflects a commitment to reshaping user experiences"
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="@color/SecondaryTextColor"
android:layout_marginBottom="10dp"
android:justificationMode="inter_word"/>

<LinearLayout
android:id="@+id/ButtonFeedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/search_bar_background"
android:layout_marginTop="20dp"
android:orientation="horizontal">

<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="Rate this App"
android:fontFamily="@font/sf_pro_display_regular"
android:textStyle="bold"
android:textColor="@color/PrimaryTextColor"
android:layout_marginTop="12dp"
android:layout_marginHorizontal="15dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="Your valuable feedback can improve app"
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="@color/SecondaryTextColor"
android:layout_marginBottom="15dp"
android:layout_marginHorizontal="15dp"/>


</LinearLayout>

</LinearLayout>

<LinearLayout
android:id="@+id/ButtonName2"
android:id="@+id/ButtonReportBug"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/search_bar_background"
Expand All @@ -40,7 +121,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="Title"
android:text="Report a Bug"
android:fontFamily="@font/sf_pro_display_regular"
android:textStyle="bold"
android:textColor="@color/PrimaryTextColor"
Expand All @@ -51,7 +132,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="Sub Text"
android:text="Found a bug? Tell us; we'll strive to fix it."
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="@color/SecondaryTextColor"
android:layout_marginBottom="15dp"
Expand Down

0 comments on commit 9a62243

Please sign in to comment.