Skip to content

Commit

Permalink
#8 add dropdown arrow icon
Browse files Browse the repository at this point in the history
update libraries
version 1.0.8
  • Loading branch information
Lesilva committed Apr 25, 2015
1 parent 950b1e7 commit ad101ae
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 21 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ or you can also store you arrays in arrays.xml and do something like this in you
String[] COUNTRIES = getResources().getStringArray(R.array.countries_list);
```

For usage of MaterialEditText 2.0.3, check it out [here](https://github.com/rengwuxian/MaterialEditText/wiki)

If you want to use material style AutoCompleteTextView, simplely replace BetterSpinner with MaterialBetterSpinner.

## Download
Expand All @@ -47,14 +49,14 @@ gradle:
For normal look use (BetterSpinner):

```groovy
compile 'com.weiwangcn.betterspinner:library:1.0.7'
compile 'com.weiwangcn.betterspinner:library:1.0.8'
```

For material look use (MaterrialBetterSpinner):
```groovy
compile 'com.weiwangcn.betterspinner:library-material:1.0.7'
compile 'com.weiwangcn.betterspinner:library-material:1.0.8'
```
Note: library-material has included [MaterialEditText](https://github.com/rengwuxian/MaterialEditText).
Note: library-material has included [MaterialEditText 2.0.3](https://github.com/rengwuxian/MaterialEditText).


## Acknowledgements
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
applicationId "com.weiwangcn.betterspinner.sample"
minSdkVersion 7
targetSdkVersion 22
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
}
Expand All @@ -22,7 +22,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile project(':library')
compile project(':library-material')
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="MaterialBetterSpinner"
app:floatingLabel="normal" />
app:met_floatingLabel="normal" />

<com.rengwuxian.materialedittext.MaterialEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Text Field"
app:floatingLabel="normal" />
app:met_floatingLabel="normal" />

</LinearLayout>
10 changes: 7 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.0.7
VERSION_CODE=107
VERSION_NAME=1.0.8
VERSION_CODE=108
GROUP=com.weiwangcn.betterspinner

POM_DESCRIPTION=Android Spinner in a Better Design
Expand All @@ -11,4 +11,8 @@ POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=Lesilva
POM_DEVELOPER_NAME=Wei Wang
POM_DEVELOPER_NAME=Wei Wang

ANDROID_BUILD_TARGET_SDK_VERSION=22
ANDROID_BUILD_TOOLS_VERSION=22.0.1
ANDROID_BUILD_SDK_VERSION=22
10 changes: 5 additions & 5 deletions library-material/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion 7
targetSdkVersion 22
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
}
Expand All @@ -20,8 +20,8 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.rengwuxian.materialedittext:library:1.8.3'
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.rengwuxian.materialedittext:library:2.0.3'
}

apply from: '../maven_push.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -85,4 +86,12 @@ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
isPopup = false;
}

@Override
public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom) {
right = getContext().getResources().getDrawable(R.drawable.ic_expand_more_black_18dp);
if (right != null)
right.setAlpha(66);
super.setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom);
}

}
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.
8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion 7
targetSdkVersion 22
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
}
Expand All @@ -20,7 +20,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:appcompat-v7:22.1.0'
}

apply from: '../maven_push.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -83,4 +84,12 @@ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
isPopup = false;
}

@Override
public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom) {
right = getContext().getResources().getDrawable(R.drawable.ic_expand_more_black_18dp);
if (right != null)
right.setAlpha(66);
super.setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom);
}

}
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.

0 comments on commit ad101ae

Please sign in to comment.