Hide debug button when not in debug mode

This commit is contained in:
M66B 2018-09-26 14:43:22 +00:00
parent a4756fa069
commit ee4cca9872
2 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -23,6 +23,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -248,6 +249,10 @@ public class FragmentAbout extends FragmentEx {
}
});
boolean debug = PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("debug", false);
btnLog.setVisibility(debug ? View.VISIBLE : View.GONE);
btnDebugInfo.setVisibility(debug ? View.VISIBLE : View.GONE);
return view;
}
}