杂项
1.分割线:
<TextView android:layout_height="@dimen/xct_lthj_space_zeroone"
android:layout_width="fill_parent" android:background="@color/xct_lthj_color_commline" />
<dimen name="xct_lthj_space_zeroone">0.01dip</dimen> <color name="xct_lthj_color_commline">#BFBFBF</color> 2.查询sql语句注意加 空格 SQLiteDatabase db = helper.getReadableDatabase();
Cursor cursor = db.rawQuery("select "+columName+" from "+tableName+" where loginType = ? ", new
String[]{"1"}); 3:Toast 显示在控件 下面:
int[] xy = new int[2];
transfer_Count.getLocationOnScreen(xy);
dialogTool.showToastShort(instance, "超出最大可卖数量",
xy[0], xy[1]);
public void showToastShort(Context context, String content, int whith,
int height) {
Toast toast = Toast.makeText(context, content, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP | Gravity.LEFT, whith, height);
toast.show();
}
4: 文本框的背景效果
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<!--#d37F7F7F -->
<gradient android:startColor="@color/xct_lthj_skin_color_edittext_enabledBg"
android:endColor="@color/xct_lthj_skin_color_edittext_enabledBg" android:type="linear"
android:angle="90" />
<corners android:radius="3dip" />
<!-- android:dashGap="2dip" android:dashWidth="1dip" 使用虚线来显示边框 <padding
android:left="3dp" android:right="3dp" android:bottom="3dip" android:top="3dip"/> -->
<!-- #BFBFBF-->
<stroke android:width="0.5dip" android:color="@color/xct_lthj_skin_color_butLine_light" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:startColor="@color/xct_lthj_color_bg_white"
android:endColor="@color/xct_lthj_color_bg_white" android:type="linear"
android:angle="90" />
<corners android:radius="3dip" />
<!-- android:dashGap="2dip" android:dashWidth="1dip" 使用虚线来显示边框 <padding
android:left="3dp" android:right="3dp" android:bottom="3dip" android:top="3dip"
/> -->
<stroke android:width="0.5dip" android:color="@color/xct_lthj_skin_color_butLine_light" />
</shape>
</item>
</selector>
|