Skip to content

Instantly share code, notes, and snippets.

View kairos34's full-sized avatar
🏠
Working from home

Alper ÖZASLAN kairos34

🏠
Working from home
View GitHub Profile
@kairos34
kairos34 / add_view_preference_fragment
Created June 30, 2015 11:15
Add button to the preference fragment...
@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));
@kairos34
kairos34 / gist.html
Last active August 29, 2015 14:18
gist loading...
//firstly add this line at the end of body
<script src="https://s3.amazonaws.com/moski/gistLoader.js" type="text/javascript"></script>
//replace "GistID" with your gist id
<div class="gistLoad" data-id="GistID" id="gist-GistID">Yükleniyor ....</div>