Skip to content

Commit

Permalink
* edit
Browse files Browse the repository at this point in the history
  * 修改调用方式
  • Loading branch information
andjdk committed Oct 17, 2016
1 parent 43c3a1c commit 84b89c8
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ HVScrollListView是一个可以实现横纵滑动的列表控件。如股票列
##使用方式

###step 1:
<com.andjdk.hvscrollview.view.HVScrollView
a、把hvscrollviewlibrary-1.0.aar粘贴到lib目录下。b、在build.gradle中增加`repositories {
flatDir {
dirs 'libs'
}
}` 和dependencies中增加`compile(name: 'hvscrollviewlibrary-1.0', ext: 'aar')`这句,然后sync。这样就可以在项目中使用了





<com.andjdk.hvscrollviewlibrary.HVScrollView
android:id="@+id/hv_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.andjdk.hvscrollview.view.HVScrollView>
</com.andjdk.hvscrollviewlibrary.HVScrollView>

###step 2
HVScrollView hvScrollView= (HVScrollView) findViewById(R.id.hv_scrollview);
Expand Down
7 changes: 7 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ android {
}
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.0.0'
testCompile 'junit:junit:4.12'
compile(name: 'hvscrollviewlibrary-1.0', ext: 'aar')
}
Binary file added app/libs/hvscrollviewlibrary-1.0.aar
Binary file not shown.
5 changes: 2 additions & 3 deletions app/src/main/java/com/andjdk/hvscrollview/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import android.widget.AdapterView;
import android.widget.Toast;

import com.andjdk.hvscrollview.adapter.StockListAdapter;
import com.andjdk.hvscrollview.bean.StockDataInfo;
import com.andjdk.hvscrollview.view.HVScrollView;

import com.andjdk.hvscrollviewlibrary.HVScrollView;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* # 佛祖保佑 永无BUG #
* # #
*/
package com.andjdk.hvscrollview.bean;
package com.andjdk.hvscrollview;

/**
* Created by andjdk on 2016/10/11.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@
* # 佛祖保佑 永无BUG #
* # #
*/
package com.andjdk.hvscrollview.adapter;
package com.andjdk.hvscrollview;

import android.content.Context;
import android.view.View;

import com.andjdk.hvscrollview.R;
import com.andjdk.hvscrollview.base.CommonAdapter;
import com.andjdk.hvscrollview.base.ViewHolder;
import com.andjdk.hvscrollview.bean.StockDataInfo;

import com.andjdk.hvscrollviewlibrary.CommonAdapter;
import com.andjdk.hvscrollviewlibrary.ViewHolder;

import java.util.ArrayList;
import java.util.List;
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 @@ -7,9 +7,9 @@

tools:context="com.andjdk.hvscrollview.MainActivity">

<com.andjdk.hvscrollview.view.HVScrollView
<com.andjdk.hvscrollviewlibrary.HVScrollView
android:id="@+id/hv_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.andjdk.hvscrollview.view.HVScrollView>
</com.andjdk.hvscrollviewlibrary.HVScrollView>
</RelativeLayout>
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include ':app', ':hvscrollviewlibrary'

0 comments on commit 84b89c8

Please sign in to comment.