I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c9abfa80 authored by sponge's avatar sponge
Browse files

Make SeekBar away from edges and away from value view

parent f34ef46d
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.i2p.android.router" package="net.i2p.android.router"
android.versionCode="4719083" android.versionCode="4719076"
android.versionName="0.9.0-30_b28-API8" android.versionName="0.9.0-30_b37-API8"
android:installLocation="preferExternal" android:installLocation="preferExternal"
> >
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.i2p.android.router" package="net.i2p.android.router"
android.versionCode="4719083" android.versionCode="4719076"
android.versionName="0.9.0-30_b28-API8" android.versionName="0.9.0-30_b37-API8"
android:installLocation="preferExternal" android:installLocation="preferExternal"
> >
......
...@@ -63,11 +63,15 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee ...@@ -63,11 +63,15 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee
LinearLayout.LayoutParams params; LinearLayout.LayoutParams params;
LinearLayout layout = new LinearLayout(mContext); LinearLayout layout = new LinearLayout(mContext);
layout.setOrientation(LinearLayout.VERTICAL); layout.setOrientation(LinearLayout.VERTICAL);
layout.setPadding(6, 6, 6, 6); layout.setPadding(6, 6, 6, 10);
// Set the width so that it is as usable as possible.
// We multiplymMax so that the smaller ranges will get a bigger area.
if (mDirection == LinearLayout.HORIZONTAL) { if (mDirection == LinearLayout.HORIZONTAL) {
layout.setMinimumWidth(mMax); layout.setMinimumWidth(mMax*5);
} else { } else {
layout.setMinimumHeight(mMax); layout.setMinimumHeight(mMax*5);
} }
mSplashText = new TextView(mContext); mSplashText = new TextView(mContext);
...@@ -86,6 +90,9 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee ...@@ -86,6 +90,9 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee
mSeekBar = new SeekBar(mContext); mSeekBar = new SeekBar(mContext);
mSeekBar.setOnSeekBarChangeListener(this); mSeekBar.setOnSeekBarChangeListener(this);
// Move the bar away from the changing text, so you can see it, and
// move it away from the edges to improve usability for the end-ranges.
mSeekBar.setPadding(6, 30, 6, 6);
layout.addView(mSeekBar, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); layout.addView(mSeekBar, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
if (shouldPersist()) { if (shouldPersist()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment