Created
June 30, 2015 11:15
-
-
Save kairos34/a584a413af58445c8cae to your computer and use it in GitHub Desktop.
Add button to the preference fragment...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
LinearLayout view = (LinearLayout) super.onCreateView(inflater, container, savedInstanceState); | |
ZKButton btn_power_off = new ZKButton(getActivity().getApplicationContext()); | |
btn_power_off.setText(getResources().getString(R.string.power_off_text)); | |
ZKButton btn_restart = new ZKButton(getActivity().getApplicationContext()); | |
btn_restart.setText(getResources().getString(R.string.restart_text)); | |
view.addView(btn_power_off); | |
view.addView(btn_restart); | |
btn_power_off.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
} | |
}); | |
btn_restart.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
} | |
}); | |
return view; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment