Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Updated About dialog
Browse files Browse the repository at this point in the history
Signed-off-by: sunilpaulmathew <[email protected]>
  • Loading branch information
sunilpaulmathew committed Aug 23, 2020
1 parent c97dbbf commit 5dabecb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/main/java/com/smartpack/kernelprofiler/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ public class MainActivity extends AppCompatActivity {
private AppCompatTextView mCardTitle;
private AppCompatTextView mAppName;
private AppCompatTextView mAboutApp;
private AppCompatTextView mDevelopedBy;
private AppCompatTextView mHowTo;
private AppCompatTextView mHowToSummary;
private AppCompatTextView mChangeLog;
private AppCompatTextView mCreditsTitle;
private AppCompatTextView mCredits;
private AppCompatTextView mCancel;
private AppCompatImageView mDeveloper;
private CardView mForegroundCard;

@Override
Expand All @@ -73,6 +75,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
mCardTitle = findViewById(R.id.card_title);
mAppName = findViewById(R.id.app_title);
mAboutApp = findViewById(R.id.about_app);
mDevelopedBy = findViewById(R.id.developed_by);
mDeveloper = findViewById(R.id.developer);
mHowTo = findViewById(R.id.how_to);
mHowToSummary = findViewById(R.id.how_to_summary);
mCreditsTitle = findViewById(R.id.credits_title);
Expand All @@ -85,6 +89,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
mCancel.setOnClickListener(v -> {
closeForeground();
});
mDeveloper.setOnClickListener(v -> {
Utils.launchUrl("https://github.com/sunilpaulmathew", this);
});

if (Utils.isNotDonated(this)) {
AdView mAdView = findViewById(R.id.adView);
Expand Down Expand Up @@ -360,6 +367,8 @@ private void aboutDialogue(Context context) {
mAppIcon.setVisibility(View.VISIBLE);
mAppName.setVisibility(View.VISIBLE);
mAboutApp.setVisibility(View.VISIBLE);
mDevelopedBy.setVisibility(View.VISIBLE);
mDeveloper.setVisibility(View.VISIBLE);
mHowTo.setVisibility(View.VISIBLE);
mHowToSummary.setVisibility(View.VISIBLE);
mCreditsTitle.setVisibility(View.VISIBLE);
Expand Down Expand Up @@ -391,6 +400,8 @@ private void closeForeground() {
mAppIcon.setVisibility(View.GONE);
mAppName.setVisibility(View.GONE);
mAboutApp.setVisibility(View.GONE);
mDevelopedBy.setVisibility(View.GONE);
mDeveloper.setVisibility(View.GONE);
mHowTo.setVisibility(View.GONE);
mHowToSummary.setVisibility(View.GONE);
mCreditsTitle.setVisibility(View.GONE);
Expand Down
Binary file added app/src/main/res/drawable/ic_developer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/src/main/res/layout/rv_foreground_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,28 @@
android:textIsSelectable="true"
android:textSize="15sp" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/developed_by"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:textStyle="bold"
android:gravity="center_horizontal"
android:text="@string/developed_by"
android:textColor="?android:attr/colorAccent"
android:textIsSelectable="true"
android:visibility="gone"
android:textSize="18sp" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/developer"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_marginTop="15dp"
android:src="@drawable/ic_developer"
android:layout_gravity="center"
android:visibility="gone" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/credits_title"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<string name="description_unknown">Description for this profile is not provided by the developer.</string>
<string name="default_profile">Default Profile (Mandatory)</string>
<string name="default_profile_summary">Specify default profile name (including \'.sh\' extension) here!</string>
<string name="developed_by">Developed By</string>
<string name="developer_credits">Developer Credits</string>
<string name="developer_credits_summary">Add credits text to be shown in the app as copyright!</string>
<string name="documentation">Documentation</string>
Expand Down

0 comments on commit 5dabecb

Please sign in to comment.