原创 二級列表 checkbox
1.okhttp依賴 compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.squareup.okio:okio:1.5.0' 2.activity_main.xml <?x
原创 XBanner支持圖片無限輪播控件
//在build.gradle文件中加入依賴 compile 'com.xhb:xbanner:1.2.2' compile 'com.nineoldandroids:library:2.4.0' //要導入一些圖片加載框架的依賴,如Gl
原创 PullToRefreshListView上拉加載下拉刷新
1.添加依賴 2.佈局 <com.handmark.pulltorefresh.library.PullToRefreshListView android:id="@+id/prl" android:layout_wi
原创 PropertyAnimation屬性動畫 ValueAnimator實現自由落體 拋物線
1.佈局activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com
原创 okhttp get post請求
1.添加依賴 compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.squareup.okio:okio:1.5.0' 2.代碼 import android.os.Hand
原创 淺談ScrollView嵌套ListView及ListView嵌套的高度計算
1.代碼 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
原创 自定義button常按監聽
import android.content.Context; import android.os.AsyncTask; import android.util.AttributeSet; import android.util.Log;
原创 viewpager 無限輪播
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <it
原创 極光推送
導入依賴 // 此處以JPush 3.0.3 版本爲例。 compile 'cn.jiguang.sdk:jpush:3.0.3' // 此處以JCore 1.1.1 版本爲例。推送compile 'cn.jiguang.sdk:jco
原创 volley+swiperefreshlayout實現checkbox全選
1.依賴 jar包 compile project(':swiperefreshlayoutlibrary') 2.佈局 activity_main <com.bawei.swiperefreshlayoutlibrary.S
原创 初學自定義view(自定義屬性)
1.values下面建attrs <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="CustomViewBottom">
原创 點擊listview item 改變其背景
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <it
原创 初學自定義view(可拖動圓)
public class SuView extends View { private float x = 100; private float y = 100; public SuView(Context cont
原创 qq授權登錄
1.導入jar包 2.權限 <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android