-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1507 from TeamAmaze/fix-1443
Fix 1443
- Loading branch information
1 parent
66d7b07
commit 3901030
Showing
11 changed files
with
602 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
package com.amaze.filemanager.activities; | ||
|
||
import android.content.ActivityNotFoundException; | ||
import android.content.ClipData; | ||
import android.content.ClipboardManager; | ||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.graphics.Bitmap; | ||
|
@@ -20,7 +17,7 @@ | |
import android.util.Log; | ||
import android.view.MenuItem; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
import android.widget.RelativeLayout; | ||
import android.widget.TextView; | ||
|
||
import com.amaze.filemanager.R; | ||
|
@@ -50,20 +47,16 @@ public class AboutActivity extends BasicActivity implements View.OnClickListener | |
|
||
private static final String KEY_PREF_STUDIO = "studio"; | ||
private static final String URL_AUTHOR_1_G_PLUS = "https://plus.google.com/u/0/110424067388738907251/"; | ||
private static final String URL_AUTHOR_1_PAYPAL = "[email protected]"; | ||
private static final String URL_AUTHOR_2_G_PLUS = "https://plus.google.com/+VishalNehra/"; | ||
private static final String URL_AUTHOR_2_PAYPAL = "https://www.paypal.me/vishalnehra"; | ||
private static final String URL_DEVELOPER1_GITHUB = "https://github.com/EmmanuelMess"; | ||
private static final String URL_DEVELOPER2_GITHUB = "https://github.com/TranceLove"; | ||
private static final String URL_DEVELOPER1_BITCOIN = "bitcoin:12SRnoDQvDD8aoCy1SVSn6KSdhQFvRf955?amount=0.0005"; | ||
private static final String URL_DEVELOPER2_DONATE = "https://paypal.me/TranceLove"; | ||
private static final String URL_REPO_CHANGELOG = "https://github.com/TeamAmaze/AmazeFileManager/commits/master"; | ||
private static final String URL_REPO_ISSUES = "https://github.com/TeamAmaze/AmazeFileManager/issues"; | ||
private static final String URL_REPO_TRANSLATE = "https://www.transifex.com/amaze/amaze-file-manager-1/"; | ||
private static final String URL_REPO_G_PLUS_COMMUNITY = "https://plus.google.com/communities/113997576965363268101"; | ||
private static final String URL_REPO_XDA = "http://forum.xda-developers.com/android/apps-games/app-amaze-file-managermaterial-theme-t2937314"; | ||
private static final String URL_REPO_RATE = "market://details?id=com.amaze.filemanager"; | ||
private static final String TAG_CLIPBOARD_DONATE = "donate_id"; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
|
@@ -218,21 +211,10 @@ public void onClick(View v) { | |
openURL(URL_AUTHOR_1_G_PLUS); | ||
break; | ||
|
||
case R.id.text_view_author_1_donate: | ||
ClipboardManager clipManager1 = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); | ||
ClipData clip1 = ClipData.newPlainText(TAG_CLIPBOARD_DONATE, URL_AUTHOR_1_PAYPAL); | ||
clipManager1.setPrimaryClip(clip1); | ||
Snackbar.make(v, R.string.paypal_copy_message, Snackbar.LENGTH_LONG).show(); | ||
break; | ||
|
||
case R.id.text_view_author_2_g_plus: | ||
openURL(URL_AUTHOR_2_G_PLUS); | ||
break; | ||
|
||
case R.id.text_view_author_2_donate: | ||
openURL(URL_AUTHOR_2_PAYPAL); | ||
break; | ||
|
||
case R.id.text_view_developer_1_github: | ||
openURL(URL_DEVELOPER1_GITHUB); | ||
break; | ||
|
@@ -241,18 +223,6 @@ public void onClick(View v) { | |
openURL(URL_DEVELOPER2_GITHUB); | ||
break; | ||
|
||
case R.id.text_view_developer_1_donate: | ||
try { | ||
openURL(URL_DEVELOPER1_BITCOIN); | ||
} catch (ActivityNotFoundException e) { | ||
Snackbar.make(v, R.string.nobitcoinapp, Snackbar.LENGTH_LONG).show(); | ||
} | ||
break; | ||
|
||
case R.id.text_view_developer_2_donate: | ||
openURL(URL_DEVELOPER2_DONATE); | ||
break; | ||
|
||
case R.id.relative_layout_translate: | ||
openURL(URL_REPO_TRANSLATE); | ||
break; | ||
|
@@ -268,6 +238,10 @@ public void onClick(View v) { | |
case R.id.relative_layout_rate: | ||
openURL(URL_REPO_RATE); | ||
break; | ||
|
||
case R.id.relative_layout_donate: | ||
openURL(URL_AUTHOR_2_PAYPAL); | ||
break; | ||
} | ||
} | ||
|
||
|
@@ -276,5 +250,4 @@ private void openURL(String url) { | |
intent.setData(Uri.parse(url)); | ||
startActivity(intent); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/amaze/filemanager/adapters/holders/DonationViewHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.amaze.filemanager.adapters.holders; | ||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.view.View; | ||
import android.widget.LinearLayout; | ||
import android.widget.TextView; | ||
|
||
import com.amaze.filemanager.R; | ||
|
||
public class DonationViewHolder extends RecyclerView.ViewHolder { | ||
|
||
public final LinearLayout ROOT_VIEW; | ||
public final TextView TITLE, SUMMARY, PRICE; | ||
public DonationViewHolder(View itemView) { | ||
super(itemView); | ||
ROOT_VIEW = itemView.findViewById(R.id.adapter_donation_root); | ||
TITLE = itemView.findViewById(R.id.adapter_donation_title); | ||
SUMMARY = itemView.findViewById(R.id.adapter_donation_summary); | ||
PRICE = itemView.findViewById(R.id.adapter_donation_price); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#757575" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<LinearLayout | ||
android:id="@+id/adapter_donation_root" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="@dimen/minimal_material_padding" | ||
android:background="?selectableItemBackground" | ||
android:orientation="horizontal" | ||
> | ||
<LinearLayout | ||
android:id="@+id/test" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:layout_marginLeft="@dimen/minimal_material_padding" | ||
android:layout_marginStart="@dimen/minimal_material_padding" | ||
android:layout_weight="1" | ||
> | ||
<TextView | ||
android:id="@+id/adapter_donation_title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
style="@style/Base.TextAppearance.AppCompat.Medium" | ||
/> | ||
<TextView | ||
android:id="@+id/adapter_donation_summary" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:textColor="@color/goback_item" | ||
android:layout_marginTop="@dimen/minimal_material_padding" | ||
style="@style/Base.TextAppearance.AppCompat.Small" | ||
/> | ||
</LinearLayout> | ||
|
||
<TextView | ||
android:id="@+id/adapter_donation_price" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="@dimen/minimal_material_padding" | ||
android:layout_marginStart="@dimen/minimal_material_padding" | ||
style="@style/Base.TextAppearance.AppCompat.Medium" | ||
android:textColor="@color/primary_light_green" | ||
/> | ||
</LinearLayout> | ||
|
||
</android.support.constraint.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.