Document PreferencesActivity and VolumePreference
This commit is contained in:
parent
c829534c74
commit
3388f4bbef
@ -24,7 +24,13 @@ import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
/**
|
||||
* The preferences activity in which one can change application preferences.
|
||||
*/
|
||||
public class PreferencesActivity extends PreferenceActivity {
|
||||
/**
|
||||
* Initialize the activity, loading the preference specifications.
|
||||
*/
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@ -40,6 +46,9 @@ public class PreferencesActivity extends PreferenceActivity {
|
||||
ContextApplication.removeActivity(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement the long-press-back-quits-application behavior.
|
||||
*/
|
||||
@Override
|
||||
public boolean onKeyLongPress(int keyCode, KeyEvent event)
|
||||
{
|
||||
|
@ -26,6 +26,12 @@ import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.SeekBar;
|
||||
|
||||
/**
|
||||
* A preference that provides a volume slider dialog.
|
||||
*
|
||||
* The position in the slider is saved as float ranging from 0 to 3 on a
|
||||
* roughly exponential scale.
|
||||
*/
|
||||
public class VolumePreference extends DialogPreference implements SeekBar.OnSeekBarChangeListener {
|
||||
public VolumePreference(Context context, AttributeSet attrs)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user