Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Lesilva committed Mar 25, 2015
1 parent 07c89bb commit 68b526b
Show file tree
Hide file tree
Showing 23 changed files with 99 additions and 32 deletions.
8 changes: 5 additions & 3 deletions app/build.gradle
Expand Up @@ -5,12 +5,13 @@ android {
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.weiwangcn.betterspinner"
applicationId "com.weiwangcn.betterspinner.sample"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
versionCode 100
versionName "1.0.0"
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -24,4 +25,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile project(':library')
compile project(':library-material')
}
@@ -1,4 +1,4 @@
package com.weiwangcn.betterspinner;
package com.weiwangcn.betterspinner.sample;

import android.app.Application;
import android.test.ApplicationTestCase;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Expand Up @@ -8,7 +8,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme.MyTheme">
<activity
android:name=".MainActivity"
android:name=".sample.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
@@ -1,4 +1,4 @@
package com.weiwangcn.betterspinner;
package com.weiwangcn.betterspinner.sample;

import android.content.Intent;
import android.net.Uri;
Expand All @@ -8,6 +8,10 @@
import android.view.MenuItem;
import android.widget.ArrayAdapter;

import com.weiwang.betterspinner.library.material.MaterialBetterSpinner;
import com.weiwangcn.betterspinner.R;
import com.weiwangcn.betterspinner.library.BetterSpinner;

import butterknife.ButterKnife;
import butterknife.InjectView;

Expand All @@ -26,7 +30,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
ButterKnife.inject(this);

String[] list = getResources().getStringArray(R.array.age);
String[] list = getResources().getStringArray(R.array.month);

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, list);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Expand Up @@ -13,7 +13,7 @@
android:background="@color/white"
tools:context=".MainActivity">

<com.weiwangcn.betterspinner.BetterSpinner
<com.weiwangcn.betterspinner.library.BetterSpinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -26,7 +26,7 @@
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:hint="Text Field" />

<com.weiwangcn.betterspinner.MaterialBetterSpinner
<com.weiwang.betterspinner.library.material.MaterialBetterSpinner
android:id="@+id/spinner2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 13 additions & 18 deletions app/src/main/res/values/arrays.xml
@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="age">
<item>a</item>
<item>b</item>
<item>c</item>
<item>d</item>
<item>e</item>
<item>f</item>
<item>g</item>
<item>h</item>
<item>i</item>
<item>j</item>
<item>k</item>
<item>l</item>
<item>m</item>
<item>n</item>
<item>o</item>
<item>p</item>
<item>q</item>
<string-array name="month">
<item>January</item>
<item>February</item>
<item>March</item>
<item>April</item>
<item>May</item>
<item>June</item>
<item>July</item>
<item>August</item>
<item>September</item>
<item>October</item>
<item>November</item>
<item>December</item>
</string-array>
</resources>
1 change: 1 addition & 0 deletions library-material/.gitignore
@@ -0,0 +1 @@
/build
25 changes: 25 additions & 0 deletions library-material/build.gradle
@@ -0,0 +1,25 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "22.0.0"

defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.rengwuxian.materialedittext:library:1.8.3'
}
17 changes: 17 additions & 0 deletions library-material/proguard-rules.pro
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/weiwang/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
@@ -0,0 +1,13 @@
package com.weiwang.betterspinner.library.material;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
8 changes: 8 additions & 0 deletions library-material/src/main/AndroidManifest.xml
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.weiwang.betterspinner.library.material">

<application android:allowBackup="true" android:label="@string/app_name">

</application>

</manifest>
@@ -1,4 +1,4 @@
package com.weiwangcn.betterspinner;
package com.weiwang.betterspinner.library.material;

import android.content.Context;
import android.graphics.Rect;
Expand Down
3 changes: 3 additions & 0 deletions library-material/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">BetterSpinner</string>
</resources>
1 change: 0 additions & 1 deletion library/build.gradle
Expand Up @@ -21,5 +21,4 @@ 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'
}
@@ -1,4 +1,4 @@
package com.weiwangcn.betterspinner;
package com.weiwangcn.betterspinner.library;

import android.app.Application;
import android.test.ApplicationTestCase;
Expand Down
@@ -1,4 +1,4 @@
package com.weiwangcn.betterspinner;
package com.weiwangcn.betterspinner.library;

import android.content.Context;
import android.graphics.Rect;
Expand Down
Binary file added screenshot/screenshot.gif
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 settings.gradle
@@ -1 +1 @@
include ':app', ':library'
include ':app', ':library', ':library-material'

0 comments on commit 68b526b

Please sign in to comment.