diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-01-05 14:32:01 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-01-05 14:32:01 -0600 |
| commit | 7033b371c28ad82e4eb6d83064cbfdeedd3ad3dc (patch) | |
| tree | cec83f9ee66da9b6b9a239f765fdc0f876c47be3 /Source/Android | |
| parent | acb583e6076f241c7cd57f98e3923d65d0ce02cd (diff) | |
| parent | ad254f1b168af78f5a96b93b250bad4ce885758c (diff) | |
Merge pull request #1784 from lioncash/android
Android: Fix a few warnings. Misc other things.
Diffstat (limited to 'Source/Android')
| -rw-r--r-- | Source/Android/res/layout/slider_layout.xml | 7 | ||||
| -rw-r--r-- | Source/Android/res/values/strings.xml | 2 | ||||
| -rw-r--r-- | Source/Android/src/org/dolphinemu/dolphinemu/utils/SliderPreference.java | 19 |
3 files changed, 13 insertions, 15 deletions
diff --git a/Source/Android/res/layout/slider_layout.xml b/Source/Android/res/layout/slider_layout.xml index 1448bf44ad..a667ff6489 100644 --- a/Source/Android/res/layout/slider_layout.xml +++ b/Source/Android/res/layout/slider_layout.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" @@ -9,14 +10,14 @@ <SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/seekBar" + android:id="@+id/sliderSeekBar" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="New Text" - android:id="@+id/textView" + tools:text="Sample Text" + android:id="@+id/sliderTextView" android:textStyle="bold"/> </LinearLayout>
\ No newline at end of file diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index 80e1b3f909..d4b5921c5e 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -178,7 +178,7 @@ <string name="stereoscopy_descrip">Stereoscopy allows you to get a better feeling of depth if you have the necessary hardware.\nHeavily decreases emulation speed and sometimes causes issues</string> <string name="stereoscopy_mode">Stereoscopy Mode</string> <string name="stereoscopy_mode_descrip">Select the stereoscopic 3D mode.</string> - <string name="sterescopy_depth">Depthn</string> + <string name="sterescopy_depth">Depth</string> <string name="sterescopy_depth_descrip">Control the distance between the virtual cameras.\nA higher value creates a stronger feeling of depth while a lower value is more comfortable.</string> <string name="convergence">Convergence</string> <string name="convergence_descrip">Control the distance of the convergence plane, this is the distance at which objects will appear to be in front of the screen.\nA higher value creates stronger out-of-screen effects while a lower value is more comfortable.</string> diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/utils/SliderPreference.java b/Source/Android/src/org/dolphinemu/dolphinemu/utils/SliderPreference.java index b5b394ed83..eab6f74ff0 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/utils/SliderPreference.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/utils/SliderPreference.java @@ -5,7 +5,6 @@ import android.content.Context; import android.os.Bundle; import android.preference.DialogPreference; import android.util.AttributeSet; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; @@ -19,8 +18,6 @@ public class SliderPreference extends DialogPreference implements SeekBar.OnSeek { private static final String androidns = "http://schemas.android.com/apk/res/android"; - private Context m_context; - // SeekBar private int m_max, m_value; private SeekBar m_seekbar; @@ -30,8 +27,7 @@ public class SliderPreference extends DialogPreference implements SeekBar.OnSeek public SliderPreference(Context context, AttributeSet attrs) { - super(context,attrs); - m_context = context; + super(context, attrs); // Seekbar values m_value = attrs.getAttributeIntValue(androidns, "defaultValue", 0); @@ -41,11 +37,11 @@ public class SliderPreference extends DialogPreference implements SeekBar.OnSeek @Override protected View onCreateDialogView() { - LayoutInflater inflater = LayoutInflater.from(m_context); + LayoutInflater inflater = LayoutInflater.from(getContext()); LinearLayout layout = (LinearLayout)inflater.inflate(R.layout.slider_layout, null, false); - m_seekbar = (SeekBar)layout.getChildAt(0); - m_textview = (TextView)layout.getChildAt(1); + m_seekbar = (SeekBar)layout.findViewById(R.id.sliderSeekBar); + m_textview = (TextView)layout.findViewById(R.id.sliderTextView); if (shouldPersist()) m_value = Integer.valueOf(getPersistedString(Integer.toString(m_value))); @@ -77,8 +73,8 @@ public class SliderPreference extends DialogPreference implements SeekBar.OnSeek } @Override - public void showDialog(Bundle state) { - + public void showDialog(Bundle state) + { super.showDialog(state); Button positiveButton = ((AlertDialog) getDialog()).getButton(AlertDialog.BUTTON_POSITIVE); @@ -86,7 +82,8 @@ public class SliderPreference extends DialogPreference implements SeekBar.OnSeek } @Override - public void onClick(View v) { + public void onClick(View v) + { if (shouldPersist()) { persistString(Integer.toString(m_seekbar.getProgress())); |
