Skip to content

Commit

Permalink
Version 1.15
Browse files Browse the repository at this point in the history
BIG UPDATE WITH A LOT OF CHANGES:
    - Included new options: tab view in main screen
    - Optimized code, application faster than ever
    - BitCoin information in real time
    - New charts, cards, and more
    - Added missing libraries in "License"
    - New dialogs, new styles, everything redefined
    - Solved bugs: now, devices with Android Lollipop can use this application (there was an error an sometimes latest version crashed)
    - And more…
  • Loading branch information
Javinator9889 committed Feb 1, 2018
1 parent c12a893 commit 8da0d04
Show file tree
Hide file tree
Showing 22 changed files with 364 additions and 927 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "javinator9889.bitcoinpools"
minSdkVersion 21
targetSdkVersion 27
versionCode 9
versionName "1.14"
versionCode 14
versionName "1.15"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
Binary file added app/release/BitCoinPools-1.15.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"app-release.apk","properties":{"packageId":"javinator9889.bitcoinpools","split":"","minSdkVersion":"21"}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":14},"path":"app-release.apk","properties":{"packageId":"javinator9889.bitcoinpools","split":"","minSdkVersion":"21"}}]
Expand Up @@ -10,7 +10,6 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkInfo;
import android.util.Log;

Expand Down
@@ -1,35 +1,41 @@
package javinator9889.bitcoinpools.FragmentViews;

import android.annotation.SuppressLint;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.afollestad.materialdialogs.MaterialDialog;

import java.util.List;

import javinator9889.bitcoinpools.R;

/**
* Created by Javinator9889 on 31/01/2018.
* Based on: https://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/
*/

public class CardsAdapter extends RecyclerView.Adapter<CardsAdapter.MyViewHolder> {
private Context context;
private List<CardsContent> btcData;

public class MyViewHolder extends RecyclerView.ViewHolder {
public TextView title, body;
TextView title, body;
View v;

public MyViewHolder(View view) {
MyViewHolder(View view) {
super(view);
title = (TextView) view.findViewById(R.id.title_text);
body = (TextView) view.findViewById(R.id.body_text);
title = view.findViewById(R.id.title_text);
body = view.findViewById(R.id.body_text);
this.v = view;
}
}

public CardsAdapter(Context context, List<CardsContent> btcData) {
CardsAdapter(Context context, List<CardsContent> btcData) {
this.context = context;
this.btcData = btcData;
}
Expand All @@ -41,10 +47,84 @@ public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
}

@Override
public void onBindViewHolder(final MyViewHolder holder, int position) {
CardsContent content = btcData.get(position);
public void onBindViewHolder(final MyViewHolder holder, @SuppressLint("RecyclerView") final int position) {
final CardsContent content = btcData.get(position);
holder.title.setText(content.getTitle());
holder.body.setText(content.getBody());
holder.v.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
switch (position) {
case 0:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.market_price))
.content(R.string.market_price_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 1:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.hash_rate))
.content(R.string.hash_rate_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 2:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.difficulty))
.content(R.string.difficulty_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 3:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.min_blocks))
.content(R.string.min_blocks_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 4:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.minutes_blocks))
.content(R.string.minutes_blocks_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 5:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.total_fees))
.content(R.string.total_fees_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 6:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.total_trans))
.content(R.string.total_trans_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
case 7:
new MaterialDialog.Builder(context)
.title(context.getString(R.string.min_benefit))
.content(R.string.min_benefit_desc, true)
.cancelable(true)
.positiveText(R.string.accept)
.build().show();
break;
default:
break;
}
return false;
}
});
}

@Override
Expand Down
Expand Up @@ -2,6 +2,7 @@

/**
* Created by Javinator9889 on 31/01/2018.
* Simple class containing cards information
*/

public class CardsContent {
Expand Down
Expand Up @@ -24,24 +24,19 @@ public class CustomMarkerView extends MarkerView {
public CustomMarkerView(Context context, int layoutResource) {
super(context, layoutResource);

tvContent = (TextView) findViewById(R.id.tvContent);
tvContent = findViewById(R.id.tvContent);
}

// callbacks everytime the MarkerView is redrawn, can be used to update the
// content (user-interface)
@Override
public void refreshContent(Entry e, Highlight highlight) {

if (e instanceof CandleEntry) {

CandleEntry ce = (CandleEntry) e;

tvContent.setText("" + Utils.formatNumber(ce.getHigh(), 0, true));
} else {

tvContent.setText("" + Utils.formatNumber(e.getY(), 0, true));
}

super.refreshContent(e, highlight);
}

Expand Down

This file was deleted.

Expand Up @@ -80,14 +80,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
}
}

/*@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
MainActivity.MAINACTIVITY_TOOLBAR.setTitle(getString(R.string.BTCP) + MARKET_PRICE_USD);
}
}*/

@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
Expand Down Expand Up @@ -217,7 +209,7 @@ public void run() {
}

private void initT(View view) {
TableRow masterRow = (TableRow) view.findViewById(R.id.masterRow);
TableRow masterRow = view.findViewById(R.id.masterRow);
TABLE_PARAMS = masterRow.getLayoutParams();
}

Expand Down

0 comments on commit 8da0d04

Please sign in to comment.