Add: Privacy Policy
MODIFY
bither-android/res/layout/fragment_cold_option.xml
bither-android/res/layout/fragment_cold_option.xml
android:textColor="#ffc2c2c2"
android:textSize="13sp"
android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/tv_privacy_policy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="5dp"
+ android:text="@string/setting_privacy_policy"
+ android:textColor="#ffc2c2c2"
+ android:textSize="13sp"
+ android:textStyle="bold"/>
+
</LinearLayout>
</LinearLayout>

MODIFY
bither-android/res/layout/fragment_hot_option.xml
bither-android/res/layout/fragment_hot_option.xml
android:textColor="#ffc2c2c2"
android:textSize="13sp"
android:textStyle="bold"/>
+
+ <TextView
+ android:id="@+id/tv_privacy_policy"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="5dp"
+ android:text="@string/setting_privacy_policy"
+ android:textColor="#ffc2c2c2"
+ android:textSize="13sp"
+ android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>

MODIFY
bither-android/res/values/strings.xml
bither-android/res/values/strings.xml
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
+ <string name="setting_privacy_policy">Privacy Policy</string>
+
</resources>

MODIFY
bither-android/src/net/bither/fragment/cold/OptionColdFragment.java
bither-android/src/net/bither/fragment/cold/OptionColdFragment.java
@@ -20,7 +20,9 @@ import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Bitmap;
+import android.graphics.Paint;
import android.graphics.drawable.Drawable;
+import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
@@ -72,6 +74,8 @@ import net.bither.util.FileUtil;
import net.bither.util.KeyUtil;
import net.bither.util.UnitUtilWrapper;
+import org.w3c.dom.Text;
+
import java.util.Date;
import java.util.List;
@@ -91,6 +95,7 @@ public class OptionColdFragment extends Fragment implements Selectable {
private TextView tvVersion;
private LinearLayout llQrForAll;
private DialogProgress dp;
+ private TextView tvPrivacyPolicy;
private SettingSelectorView.SettingSelector bitcoinUnitSelector = new SettingSelectorView
.SettingSelector() {
@@ -227,6 +232,21 @@ public class OptionColdFragment extends Fragment implements Selectable {
}
};
+ private OnClickListener privacyPolicyClick = new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/bither/bither-android/wiki/PrivacyPolicy"))
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ try {
+ startActivity(intent);
+ } catch (Exception e) {
+ e.printStackTrace();
+ DropdownMessage.showDropdownMessage(getActivity(), R.string.find_browser_error);
+ }
+ }
+ };
+
@Override
public void onSelected() {
configureCloneButton();
@@ -316,6 +336,8 @@ public class OptionColdFragment extends Fragment implements Selectable {
} else {
tvVersion.setVisibility(View.GONE);
}
+ tvPrivacyPolicy = (TextView) view.findViewById(R.id.tv_privacy_policy);
+ tvPrivacyPolicy.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
dp = new DialogProgress(getActivity(), R.string.please_wait);
btnGetSign.setOnClickListener(toSignActivityClickListener);
btnCloneTo.setOnClickListener(cloneToClick);
@@ -327,7 +349,7 @@ public class OptionColdFragment extends Fragment implements Selectable {
tvBackupPath = (TextView) view.findViewById(R.id.tv_backup_path);
flBackTime.setOnClickListener(backupTimeListener);
showBackupTime();
-
+ tvPrivacyPolicy.setOnClickListener(privacyPolicyClick);
}
private void showBackupTime() {

MODIFY
bither-android/src/net/bither/fragment/hot/OptionHotFragment.java
bither-android/src/net/bither/fragment/hot/OptionHotFragment.java
@@ -112,6 +112,7 @@ public class OptionHotFragment extends Fragment implements Selectable,
private TextView tvVersion;
private ImageView ivLogo;
private View llSwitchToCold;
+ private TextView tvPrivacyPolicy;
private MonitorBitherColdUtil monitorUtil;
@@ -452,6 +453,21 @@ public class OptionHotFragment extends Fragment implements Selectable,
}
};
+ private OnClickListener privacyPolicyClick = new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/bither/bither-android/wiki/PrivacyPolicy"))
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ try {
+ startActivity(intent);
+ } catch (Exception e) {
+ e.printStackTrace();
+ DropdownMessage.showDropdownMessage(getActivity(), R.string.find_browser_error);
+ }
+ }
+ };
+
private OnClickListener monitorClick = new OnClickListener() {
@Override
public void onClick(View v) {
@@ -701,6 +717,8 @@ public class OptionHotFragment extends Fragment implements Selectable,
tvVersion = (TextView) view.findViewById(R.id.tv_version);
tvWebsite = (TextView) view.findViewById(R.id.tv_website);
tvWebsite.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
+ tvPrivacyPolicy = (TextView) view.findViewById(R.id.tv_privacy_policy);
+ tvPrivacyPolicy.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
ivLogo = (ImageView) view.findViewById(R.id.iv_logo);
btnSwitchToCold = (Button) view.findViewById(R.id.btn_switch_to_cold);
llSwitchToCold = view.findViewById(R.id.ll_switch_to_cold);
@@ -735,6 +753,7 @@ public class OptionHotFragment extends Fragment implements Selectable,
tvWebsite.setOnClickListener(websiteClick);
ivLogo.setOnClickListener(logoClickListener);
setAvatar(AppSharedPreference.getInstance().getUserAvatar());
+ tvPrivacyPolicy.setOnClickListener(privacyPolicyClick);
}
private void setAvatar(String photoName) {

Add: Privacy Policy