Skip to content
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
26 changes: 17 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
# Built application files
*.apk *.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class

# Generated files
bin/ gen/ out/
build/

# Gradle files
.gradle/
build/
gradle/
gradlew
gradlew.bat

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/
# Intellij
*.iml .idea/workspace.xml /.idea/libraries

# Keystore files
*.jks
.DS_Store
.idea

# Intellij
.idea/
*.iml

.DS_Store
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ Developers can customize the following attributes (both via XML and programmatic
| name | format | description | default value |
| :--------------------------:| :------: | :-----------: | :-----------: |
| lineColor | color | Range bar color | #F7F7F7 |
| activeLineColorMode | integer | Active range bar coloring (solid or gradient) | 0 (ColorMode.SOLID) |
| activeLineColor | color | Active range bar color | #0C6CE1 |
| activeLineGradientStart | color | Active range bar gradient start color | #0C6CE1 |
| activeLineGradientEnd | color | Active range bar gradient end color | #0C6CE1 |
| fixedLineColor | color | Fixed range bar color | #E3E3E3 |
| lineThickness | dimension | Range bar thickness | 4 |
| activeLineThickness | dimension | Active range bar thickness | 6 |
Expand Down
11 changes: 5 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 27
defaultConfig {
applicationId "me.bendik.sample"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -22,7 +21,7 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile project(':simplerangeview')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:support-v4:27.1.1'
}
6 changes: 3 additions & 3 deletions app/src/main/java/me/bendik/sample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager = findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);

TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
TabLayout tabLayout = findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:popupTheme="@style/AppTheme.PopupOverlay">

</android.support.v7.widget.Toolbar>
Expand Down
63 changes: 43 additions & 20 deletions app/src/main/res/layout/fragment_basic_example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,75 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/range_views_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:orientation="vertical">
android:paddingTop="@dimen/activity_vertical_margin">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="Simple RangeView with labels"/>
android:text="Simple RangeView with labels" />

<me.bendik.simplerangeview.SimpleRangeView
android:id="@+id/rangeview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Start"/>
android:text="Start" />

<EditText
android:id="@+id/edit_start"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:inputType="number"
android:text="0"/>
android:text="0" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="End"/>
android:text="End" />

<EditText
android:id="@+id/edit_end"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:inputType="number"
android:text="9"/>
android:text="9" />
</LinearLayout>
</LinearLayout>

Expand All @@ -73,52 +79,69 @@
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="RangeView with fixed area"/>
android:text="RangeView with fixed area" />

<me.bendik.simplerangeview.SimpleRangeView
android:id="@+id/fixed_rangeview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:count="10"
app:start="3"
app:end="6"
app:showFixedLine="true"
app:startFixed="2"
app:endFixed="7"
/>
app:showFixedLine="true"
app:start="3"
app:startFixed="2" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="RangeView with movable range"/>
android:text="RangeView with movable range" />

<me.bendik.simplerangeview.SimpleRangeView
android:id="@+id/rangeview_movable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:count="10"
app:start="3"
app:end="6"
app:movable="true"
/>
app:start="3" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="RangeView with minimal range size"/>
android:text="RangeView with minimal range size" />

<me.bendik.simplerangeview.SimpleRangeView
android:id="@+id/rangeview_min_distance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:count="10"
app:start="2"
app:end="8"
app:minDistance="3"
/>
app:start="2" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:text="RangeView with gradient active line" />

<me.bendik.simplerangeview.SimpleRangeView
android:id="@+id/rangeview_gradient"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:activeLineColorMode="gradient"
app:activeLineGradientEnd="@color/colorPrimary"
app:activeLineGradientStart="@color/colorAccent"
app:count="10"
app:end="10"
app:minDistance="1"
app:start="0" />

</LinearLayout>
</android.support.v4.widget.NestedScrollView>
19 changes: 7 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.60'
ext.kotlin_version = '1.2.51'

repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

Expand All @@ -24,10 +22,7 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
}

Expand Down
7 changes: 3 additions & 4 deletions simplerangeview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ ext {
}

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27

defaultConfig {
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"

Expand All @@ -38,7 +37,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.android.support:support-compat:26.1.0'
compile 'com.android.support:support-compat:27.1.1'
}

// or use the remote copy to keep update with latest changes
Expand Down
Loading