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.preference.PreferenceActivity;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The preferences activity in which one can change application preferences.
|
||||||
|
*/
|
||||||
public class PreferencesActivity extends PreferenceActivity {
|
public class PreferencesActivity extends PreferenceActivity {
|
||||||
|
/**
|
||||||
|
* Initialize the activity, loading the preference specifications.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
@ -40,6 +46,9 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
ContextApplication.removeActivity(this);
|
ContextApplication.removeActivity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement the long-press-back-quits-application behavior.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyLongPress(int keyCode, KeyEvent event)
|
public boolean onKeyLongPress(int keyCode, KeyEvent event)
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,12 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.SeekBar;
|
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 class VolumePreference extends DialogPreference implements SeekBar.OnSeekBarChangeListener {
|
||||||
public VolumePreference(Context context, AttributeSet attrs)
|
public VolumePreference(Context context, AttributeSet attrs)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user