Commit 66a1157e authored by Donald's avatar Donald

noGplay version fix

parent d4e7fabe
......@@ -186,7 +186,6 @@ public class MainActivity extends SharedMediaActivity {
}
invalidateOptionsMenu();
firstLaunch = false;
requestSdCardPermissions();
}
private void displayCurrentAlbumMedia(boolean reload) {
......
......@@ -2,7 +2,6 @@ package org.horaapps.leafpic.activities;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
......@@ -12,7 +11,6 @@ import android.widget.ScrollView;
import android.widget.TextView;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.iconics.IconicsDrawable;
import com.mikepenz.iconics.view.IconicsImageView;
import org.horaapps.leafpic.R;
......@@ -34,93 +32,74 @@ public class DonateActivity extends ThemedActivity {
super.onPostCreate(savedInstanceState);
setContentView(R.layout.activity_donate);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setNavBarColor();
cts = new CustomTabService(org.horaapps.leafpic.activities.DonateActivity.this, getPrimaryColor());
scr = (ScrollView)findViewById(R.id.donateAct_scrollView);
iniUi();
cts = new CustomTabService(org.horaapps.leafpic.activities.DonateActivity.this, getPrimaryColor());
}
@Override
public void onPostResume() {
super.onPostResume();
setTheme();
}
private void setTheme(){
/**** ToolBar *****/
toolbar.setBackgroundColor(getPrimaryColor());
private void iniUi() {
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(
new IconicsDrawable(this)
.icon(GoogleMaterial.Icon.gmd_arrow_back)
.color(Color.WHITE)
.sizeDp(19));
toolbar.setNavigationIcon(getToolbarIcon(GoogleMaterial.Icon.gmd_arrow_back));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
toolbar.setTitle(getString(R.string.donate));
findViewById(R.id.donate_googleplay_card).setVisibility(View.GONE);
((Button) findViewById(R.id.button_donate_paypal)).setText(getString(R.string.donate).toUpperCase());
findViewById(R.id.button_donate_paypal).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
cts.launchUrl("https://www.paypal.me/HoraApps");
}
});
findViewById(R.id.donate_bitcoin_item).setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("HoraApps BTC", ((TextView) v).getText());
clipboard.setPrimaryClip(clip);
StringUtils.showToast(getApplicationContext(), getString(R.string.address_copied));
return true;
}
});
}
@Override
public void updateUiElements() {
toolbar.setBackgroundColor(getPrimaryColor());
setStatusBarColor();
setNavBarColor();
setRecentApp(getString(R.string.donate));
findViewById(R.id.donate_googleplay_card).setVisibility(View.GONE);
/**** Title Cards ***/
((TextView) findViewById(R.id.team_name)).setTextColor(getAccentColor());
((TextView) findViewById(R.id.donate_googleplay_item_title)).setTextColor(getAccentColor());
((TextView) findViewById(R.id.donate_paypal_item_title)).setTextColor(getAccentColor());
((TextView) findViewById(R.id.donate_bitcoin_item_title)).setTextColor(getAccentColor());
/** BackGround **/
findViewById(R.id.donate_background).setBackgroundColor(getBackgroundColor());
/** Cards **/
int color = getCardBackgroundColor();
((CardView) findViewById(R.id.donate_header_card)).setCardBackgroundColor(color);
((CardView) findViewById(R.id.donate_paypal_card)).setCardBackgroundColor(color);
((CardView) findViewById(R.id.donate_bitcoin_card)).setCardBackgroundColor(color);
/** Icons **/
color = getIconColor();
((IconicsImageView) findViewById(R.id.donate_paypal_icon_title)).setColor(color);
((IconicsImageView) findViewById(R.id.donate_bitcoin_icon_title)).setColor(color);
((IconicsImageView) findViewById(R.id.donate_header_icon)).setColor(color);
/** TextViews **/
color = getTextColor();
((TextView) findViewById(R.id.donate_paypal_item)).setTextColor(color);
((TextView) findViewById(R.id.donate_bitcoin_item)).setTextColor(color);
((TextView) findViewById(R.id.donate_header_item)).setTextColor(color);
/***** ScrolView *****/
setScrollViewColor(scr);
/** ACTIONS **/
((Button) findViewById(R.id.button_donate_paypal)).setText(getString(R.string.donate).toUpperCase());
findViewById(R.id.button_donate_paypal).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
cts.launchUrl("https://www.paypal.me/HoraApps");
}
});
findViewById(R.id.donate_bitcoin_item).setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Copied to Clipboard", ((TextView) v).getText());
clipboard.setPrimaryClip(clip);
StringUtils.showToast(getApplicationContext(),getString(R.string.address_copied));
return true;
}
});
}
}
\ No newline at end of file
......@@ -137,7 +137,7 @@ public class DonateActivity extends ThemedActivity {
@Override
public boolean onLongClick(View v) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Copied to Clipboard", ((TextView) v).getText());
ClipData clip = ClipData.newPlainText("HoraApps BTC", ((TextView) v).getText());
clipboard.setPrimaryClip(clip);
StringUtils.showToast(getApplicationContext(),getString(org.horaapps.leafpic.R.string.address_copied));
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment