Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andy7076 committed Jun 10, 2017
1 parent 9fb8296 commit 02dda3a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.autotrans'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.andy7.myviewdemo"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
Expand All @@ -26,8 +28,7 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.0.1'

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@

import java.util.HashMap;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MySpinnerActivity extends AppCompatActivity {

@BindView(R.id.myspinner)
MySpinner myspinner;

private HashMap<Integer, String> hashMap;
Expand All @@ -24,7 +20,7 @@ public class MySpinnerActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_spinner);
ButterKnife.bind(this);
myspinner = (MySpinner) findViewById(R.id.myspinner);
hashMap = new HashMap<>();
hashMap.put(1, "GREEN");
hashMap.put(2, "RED");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
* BeforeSaleFragment中的RecyclerAdapters
* Created by andy7 on 2017/3/17.
Expand Down Expand Up @@ -60,14 +57,13 @@ public int getItemCount() {

class MyViewHolder extends RecyclerView.ViewHolder {

@BindView(R.id.txt_item_myspinner)
TextView txtItemMyspinner;
@BindView(R.id.container_item_myspinner)
LinearLayout containerItemMyspinner;

public MyViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
txtItemMyspinner = (TextView) itemView.findViewById(R.id.txt_item_myspinner);
containerItemMyspinner = (LinearLayout) itemView.findViewById(R.id.container_item_myspinner);
}
}

Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 02dda3a

Please sign in to comment.