2016.06.22
1.TextView 设置图片和文字图片距离 使用
android:drawableLeft="@drawable/ic_menu_msg_compose_holo_dark"
android:drawablePadding="20dip"
<TextView
android:id="@+id/add_mms_item"
android:layout_width="match_parent"
android:layout_height="60dip"
android:textColor="#cc333333"
android:focusable="true"
android:gravity="center_vertical"
android:drawableLeft="@drawable/ic_menu_msg_compose_holo_dark"
android:drawablePadding="20dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/new_message"
android:background="@drawable/add_message_item_background"
/>
2.EditText 获取焦点不弹出软键盘 在 AndroidMainfest.xml中选择哪个activity,设置windowSoftInputMode属性为 adjustUnspecified|stateHidden
< activity Android:name=".Main"
android:label="@string/app_name"
android:windowSoftInputMode="adjustUnspecified|stateHidden"
android:configChanges="orientation|keyboardHidden">
< /activity>
在 父 Activity 中 onCreate 中加上
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
对EditText设置:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mSubjectTextEditor.getWindowToken(),0);
3.git 设置git st 在 ~/.gitconfig 文件里面进行别名设置,即加上下面这几行
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff