- 博客(59)
- 资源 (4)
- 收藏
- 关注
原创 http://dl-ssl.google.com/android/eclipse/ 或者 http://dl.google.com/android/eclipse/
https://www.cnblogs.com/bjzhanghao/archive/2012/11/14/android-platform-sdk-download-mirror.html
2018-04-27 22:53:49 262
原创 查看签名文件
keytool -list -v -keystore [签名文档文件名] -storepass [签名密码] > [输出保存文件名称].txt
2018-04-27 15:12:41 570
原创 单位 长度 kb mb
private String setSize(String size){ String result = ""; long kbSize = Long.parseLong(size); if (kbSize>1024) result = kbSize/1024 + "MB"; else result = kbSize + "KB"; return result;}
2018-04-26 16:49:55 360
原创 获取宽度
Paint paint = new Paint();paint.setTextSize(textView.getTextSize());float size = paint.measureText(textView.getText().toString());
2018-04-26 14:28:34 128
原创 RelativeLayout 版本号
<TextView android:id="@+id/version" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginRight="2dp" android:t..
2018-04-26 11:24:22 71
原创 linearlayout 版本号
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/><TextView android:id="@+id/version" android:layout_width="wrap_content&qu
2018-04-26 11:20:00 103
原创 map 遍历
for (String key : map.keySet()) { System.out.println("key= "+key+" and value= "+map.get(key));}
2018-04-24 17:19:25 63
原创 返回键
@Overridepublic void onBackPressed(){ AlertDialog.Builder dialog = new AlertDialog.Builder(this); dialog.setTitle("确认退出"); dialog.setMessage("你确定要退出吗?"); dialog.setNeutralButton("确定", new DialogI...
2018-04-23 11:36:21 159
原创 include部分隐藏
包在linearlayout里<LinearLayout android:id="@+id/header" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" > <in...
2018-04-23 10:34:07 683
原创 linearlayout setOrientation style
layout.setOrientation(LinearLayout.HORIZONTAL); txtView.setGravity(Gravity.CENTER_VERTICAL); txtView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
2018-04-22 09:34:27 3278
原创 按下背景 shape checked style
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@color/white" android:state_checked="f
2018-04-21 10:55:35 156
原创 tablelayout标线
<TableLayout android:showDividers="middle|beginning|end" android:divider="@drawable/shape_table_diver" ></TableLayout><?xml version="1.0" encoding="utf-8"?><
2018-04-20 09:51:08 347
原创 textview长度
Paint paint = new Paint(); paint.setTextSize(textView.getTextSize()); float size = paint.measureText(textView.getText().toString());
2018-04-19 14:27:22 281
原创 计时器
Timer timer = new Timer();timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { } }, 0, 1000L);...timer.cancel();
2018-04-19 09:16:48 171
原创 drawable 背景
imageButton.setImageDrawable(getResources().getDrawable(R.drawable.img));imageButton.setImageResource(R.drawable.img);
2018-04-18 21:54:10 398
原创 时间差
Time startTime = new Time();startTime.setToNow();...Time endTime = new Time();endTime.setToNow();int second = endTime - startTime;
2018-04-18 16:29:34 106
原创 listview去掉分割线
<ListView android:divider="@null"/><ListView android:divider="#00000000"/>
2018-04-18 15:31:08 597
原创 font字体
textView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/yahei.ttf"));import android.content.Context;import android.graphics.Typeface;import android.widget.TextView;public class Fonte...
2018-04-18 13:27:40 358
原创 设置颜色 style
View cv = getWindow().getDecorView();cv.setBackgroundColor(getResources().getColor(R.color.white));cv.setTextColor(getResources().getColor(R.color.white));
2018-04-18 11:48:05 1142
原创 style里的textcolor和background
<style name="style1"> <item name="android:textColor">@drawable/selector_txt</item> <item name="android:background">@drawable/selector_btn</item></
2018-04-18 10:53:56 826
原创 selector enable失效 style
有顺序,从上往下<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/shape_btn_disabled" andro
2018-04-18 10:35:12 383
原创 style
<style name="style1"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">50dp</item> <item name="androi
2018-04-18 09:33:21 136
原创 横屏
if(this.getResources().getConfiguration().orientation ==Configuration.ORIENTATION_PORTRAIT){ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);}
2018-04-17 16:01:07 169
原创 edittext左边画图片
<EditText android:drawableLeft="@drawable/img"</EditText>
2018-04-17 15:41:57 692
原创 圆滑边角背景 shape style
shape.xml<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <corners android:radius="20dp"/> <solid
2018-04-17 15:25:15 291
原创 scroll指定位置
必须异步触发执行Handler scrollHandler = new Handler(){ public void handleMessage(Message msg) { try { Thread.sleep(100); hScroll.scrollTo(600, 0); } catch (Interrup...
2018-04-17 14:54:26 870
原创 Document转String
private static void myDebug(Document doc){ try{ DOMSource source = new DOMSource(doc); StringWriter writer = new StringWriter(); Result result = new StreamResult(writer); Transformer transfor...
2018-04-17 14:32:19 2182
原创 dialog
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);builder.setTitle("标题");builder.setMessage("是否要做什么?");builder.setPositiveButton("是", new DialogInterface.OnClickListener() {...
2018-04-17 09:57:57 83
原创 layout底部左右侧
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignBottom="@+id/rl_login" android:layout_alignParentBott...
2018-04-16 14:25:20 298
原创 tablelayout均匀宽度
<TableLayout> <TableRow> <Button android:text="一" android:layout_width="1dip"></Button> <Button android:text="两字" android:layout_width="1dip"&
2018-04-16 12:44:06 828
QWidget给qt3dStudio发信号
2021-01-25
qml与qwidget结合的checkbox
2021-01-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人