原创 ListView(1)+intent獲得應用
***ListView初步基礎*** 在底部增加視圖addFooterView(view); 最簡單的listView點擊每個item跳轉界面 mListView = (ListV
原创 網絡獲取bitmap
刷新adaptergridAdapter.notifyDataSetChanged(); 通過地址獲取bigmap URL url=new URL("路徑"); HttpURLConnection url
原创 URL步驟
獲取urlURL url = new URL(urlString);` 打開鏈接HttpURLConnection connection = (HttpURLConnection) url.openConnection(); 設
原创 GridView(1)+包管理區獲取已經安裝程序
基本屬性 numColumns=”auto_fit”列數根據屏幕大小自動適應 verticalSpacing=”“垂直方向的間距 stretchMode=”columnWidth|spacingWidth” 把最左邊和右邊
原创 Asynctask下載框架
***Asynctask下載框架*** 注意execute方法的使用——–new AppAsyncTask().execute(); /** * 1. download方法 url localPath lis
原创 ViewPage
架包 android.support.v4.view.ViewPager 基礎方法 表示屏幕上最多有哪些viewPage被加載 mViewPager.setOffscreenPageLimit(“數字”); 默認頁 mV
原创 http解析XML
URL httpUrl=new URL("**"); HttpURLConnection coon=(HttpURLConnection)httpUrl.openConnection(); coon.setReadTimeout(5000
原创 初識API(百度地圖API)--------待完成
獲取密鑰 核心類: MapView: 展示地圖 mBaiduMap=mMapView.getMap(); BaiduMap: 控制地圖 SDKInitializer: 初始化地圖 基礎地圖 地圖顯示 覆蓋物添
原创 HttpUrlConnection
webview BufferedReader reader=new BufferedReader(new InputStream(coon.getInputStream)); reader.redaLine(); //網站解析出來獲取
原创 第二階段--最終作業
設置圓角的有點擊事件的資源的background… <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state
原创 SQlite數據庫(2)----android 操作
SQlite數據庫(1) 使用到的類SQliteOpenHelper 第三個參數遊標工廠 SQliteOpenHelper helper=new SQliteOpenHelper(this,"sjx.db",null,1){ @Ove
原创 屏幕適配技巧(隨時更新)
佈局適配 禁止絕對佈局 少用px 多使用wrap_concent這種 技巧使用layout_ weight 圖片適配 .9圖 左上拉伸 右下文本
原创 picasso框架
下載緩存能力 自適應能力 壓縮能力 類型轉換能力 加載圖片 Picasso picasso=Picasso.with("activity.this"); RequestCreator request=picasso.load("u
原创 ExpandableListView(手風琴)(1)---BaseExpandableListAdapter
基礎屬性 groupIndicator 組左側的箭頭 事件 適配器處理 自定義抽象適配器繼承BaseExpandableListAdapter 重寫構造方法 //此處爲public便於子類使用 獲取控件 public
原创 ExpandableListView(手風琴)(2)---CursorTreeAdapter(數據庫)
ExpandableListView(手風琴)(1)—BaseExpandableListAdapter 自定義適配器繼承CursorTreeAdapter 構造方法比base額外傳遞進來一個cursor LayoutIn