原创 TextView雜知識
第一:獲取 textview判斷是否有省略號 方法一:getlineCount() 返回值爲0 Layout l = location.getLayout(); if ( l!= null){
原创 android Activity 的幾種跳轉方式
第一:startActivity(A.this,B.class); 第二:Intent intent=new Intent(A.this,B.class); startActivity(intent); 第三:Intent intent=
原创 GrideView
第一:取消單擊itemGrideView自帶單機效果 gridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); 第二:GrideView中item的子控件爲button、i
原创 TextUtils類
第一:TextUtils類常用的有兩個方法isEmpty(判斷爲空)與equals (判斷相等),返回值爲boolean true或false 1.TextUtils.isEmpty(String str) 判斷str是否爲空 2.T
原创 ProgressDialog雜知識
第一:帶title的progressdialog ProgressDialog pdup; pdup= ProgressDialog.show(Activity.this, "發佈供求", "正在發佈…"); pdup.dismiss()
原创 RadioButton 單選按鈕組
第一:可以取消默認圖標設置 android:button="@null"但是這樣左邊原先圖片的空間就空出來了消除空白處方法:android:background="@null"就可以
原创 高德地圖遇見的問題
第一如何實現單擊marker 不彈出InfoWindow aMap.setInfoWindowAdapter(this); 不寫這段話單擊marker就不會彈出infowindow 第二設置縮放比例 aMap.moveCamera(Cam
原创 Button雜知識
第一:Button上下左右添加圖片(TextView也有同樣的屬性) 1:xml中添加。簡單 android:drawableLeft="@drawable/search_bar_edit_bg" 2:代碼中
原创 開發過程中遇見的myeclipse提示錯誤
第一:Dx 1 error; aborting,Conversion to Dalvik format failed with error 1 原因很簡單,項目中的同一個jar包在項目中存在兩個以上的版本 第二: R.layout.reg
原创 Myeclipse 使用總結
第一:ctrl +f 搜索;ctrl+h 全局搜索
原创 除去程序打開短暫黑屏的問題
第一:將黑屏轉換爲白屏 <item name="android:windowBackground">@color/white</item> 第二:將黑屏去掉 <style name="Conten
原创 判斷圖片文件是否存在
判斷圖片文件是否存在 X.exists() 存在返回true,不存在返回false
原创 EditText雜知識
第一 設置背景 第一步:在drawable文件夾下創建edittext文件,圓角顯示兩種任選其一,padding顯示只有一種方式 <?xml version="1.0" encoding="utf-8"?>
原创 採用第三方插件對圖片進行縮放處理
第一種GestureImageView 1.將gesture-imageview中com.polites.android粘到自己程序中。 2.layout設置,注意:LinearLayout中的 xmlns:gesture-image=
原创 BaseAdapter 遇見的問題
第一:LayoutInflater i=LayoutInflater.from(JiajishiActivity.this);或者LayoutInflater i=LayoutInflater.from(context);情況 adap