Skip to content

Instantly share code, notes, and snippets.

View DavidTPate's full-sized avatar

David Pate DavidTPate

  • Denver
View GitHub Profile
<uses-permission android:name="android.permission.CAMERA" />
git push --mirror git@github.com:username/project.git
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
LoginConfig.init(this);
mSaveUsernameView = (CheckBox) findViewById(R.id.save_username);
mSaveUsernameView.setVisibility(LoginConfig.getShowSaveUsername() ? View.VISIBLE : View.INVISIBLE);
public class LoginConfig {
/**
* Whether to hide Login functionality from the user.
*/
private static boolean mShowSaveUsername = false;
public static boolean getShowSaveUsername() {
return mShowSaveUsername;
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Version History
version 1 - initial version.
-->
<login_config version="1">
<!-- Flag indicating if Save Username field should be displayed -->
<bool name="showSaveUsername">true</bool>
</login_config>