Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature which allows to draw an icon above a thumb #107

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ proguard/

# Don't commit the pgp certificate
/deploy/secring.gpg
/.project
Binary file added Assets/main_screen_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If you are coming from [the original repo](https://github.com/yahoo/android-rang

This library provides a SeekBar similar to the default Android one, but with two thumb controls allowing a range to be selected.

![](demo_screenshot.png)
![Demo gif](https://github.com/mykolaj/android-range-seek-bar/blob/develop/Assets/main_screen_animated.gif)

# Features and customizations

Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
Expand All @@ -17,5 +21,9 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
9 changes: 9 additions & 0 deletions depconfig.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ext {
compile_sdk_version = 26
build_tools_version = '26.0.1'
min_sdk_version = 19
target_sdk_version = 26
app_compat_version = '26.0.2'
// If you like you can also put all of your dependencies here like that
// firebase_crash : "com.google.firebase:firebase-crash:$firebaseVersion",
}
15 changes: 10 additions & 5 deletions rangeseekbar-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
apply from: rootProject.file('depconfig.gradle')
apply plugin: 'com.android.application'
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion compile_sdk_version
buildToolsVersion build_tools_version

defaultConfig {
applicationId "org.florescu.android.rangeseekbar.sample"
minSdkVersion 15
targetSdkVersion 23
minSdkVersion min_sdk_version
targetSdkVersion target_sdk_version
versionCode 1
versionName "1.0"
}
Expand All @@ -26,6 +31,6 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile "com.android.support:appcompat-v7:$app_compat_version"
compile project(':rangeseekbar')
}
4 changes: 3 additions & 1 deletion rangeseekbar-sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
android:label="@string/app_name">
<activity
android:name=".DemoActivity"
android:label="@string/app_name">
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@
import android.app.Activity;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

import org.florescu.android.rangeseekbar.RangeSeekBar;

public class DemoActivity extends Activity {

/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android"
>

<item>
<shape android:shape="oval">
<size
android:width="28dp"
android:height="28dp"
/>
<solid android:color="@android:color/black"/>
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp"
>
<shape android:shape="oval">
<solid android:color="@android:color/white"/>
</shape>
</item>
<item android:gravity="center">
<shape android:shape="oval">
<size
android:width="8dp"
android:height="8dp"
/>
<solid android:color="@android:color/black"/>
</shape>
</item>
</layer-list>
Loading