Show check on debug only

This commit is contained in:
M66B 2019-07-21 21:19:21 +02:00
parent ba19d816c5
commit 4fb5c528ca
1 changed files with 4 additions and 1 deletions

View File

@ -52,6 +52,9 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setSubtitle(R.string.menu_pro); setSubtitle(R.string.menu_pro);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean debug = prefs.getBoolean("debug", false);
View view = inflater.inflate(R.layout.fragment_pro, container, false); View view = inflater.inflate(R.layout.fragment_pro, container, false);
tvPending = view.findViewById(R.id.tvPending); tvPending = view.findViewById(R.id.tvPending);
@ -89,7 +92,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
btnPurchase.setEnabled(false); btnPurchase.setEnabled(false);
tvPrice.setText(null); tvPrice.setText(null);
btnCheck.setEnabled(false); btnCheck.setEnabled(false);
btnCheck.setVisibility(Helper.isPlayStoreInstall(getContext()) ? View.VISIBLE : View.GONE); btnCheck.setVisibility(Helper.isPlayStoreInstall(getContext()) && debug ? View.VISIBLE : View.GONE);
return view; return view;
} }