Back to project page quickreturn-listview.
The source code is released under:
Apache License
If you think the Android project quickreturn-listview listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.tatarka.sample; // ww w. ja v a 2 s . c om import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.widget.CheckBox; import android.widget.CompoundButton; import me.tatarka.QuickReturnLayout; /** * User: evantatarka Date: 10/1/13 Time: 9:57 AM */ public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final QuickReturnLayout quickReturnLayout = (QuickReturnLayout) findViewById(R.id.quick_return_layout); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { getActionBar().setDisplayShowCustomEnabled(true); getActionBar().setCustomView(R.layout.options); final CheckBox mAnimate = (CheckBox) getActionBar().getCustomView().findViewById(R.id.animate); final CheckBox mLock = (CheckBox) getActionBar().getCustomView().findViewById(R.id.lock); mAnimate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { quickReturnLayout.setAnimate(checked); } }); mLock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { quickReturnLayout.setLocked(checked); } }); } else { quickReturnLayout.setAnimate(true); } } }