--------------------------------------------------------------------------------
LinearLayout的android:gravity才是控制子控件的位置
--------------------------------------------------------------------------------
Android.View.ViewGroup.LayoutParams,设置的技巧是,如果根标签是那个布局就要使用那个布局,比如根标签是LinearLayout,那就要设置成LinearLayout.LayoutParams
--------------------------------------------------------------------------------
获取控件的坐标值:
int[] location = new int[2];
mBtnRcd.getLocationInWindow(location); // 获取在当前窗口内的绝对坐标
int btn_rc_Y = location[1];
int btn_rc_X = location[0];
但是,有些空间是获取不到的,比如popupwindow
--------------------------------------------------------------------------------
用代码动态改变控件的高度,有些可以比如TextView,有些不行LinearLayout
---------------------------------------------------------------------------------
如何隐藏edittext闪烁光标
在EditText控件的xml中添加这个属性就行了
android:cursorVisible="false"
需要在EditText输入的时候左起位置和自动换行后每行的左起位置都能空出10dp
android:paddingLeft="10dip"