I\'m quite new to Android Development and just came across Preferences.
I found PreferenceScreen
and wanted to create a login functionality with it. The only pr
Add
setContentView(R.layout.buttonLayout);
Below
addPreferencesFromResource(R.xml.yourPreference);
buttonLayout:
Access Button by:
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Your event
}
});
You can get the button on top or on bottom of the screen by putting the button in RelativeLayout:
bottom_control_bar
This worked for me. I hope I can help someone with this piece of code.