自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

朴勇佑的专栏

共享知识

  • 博客(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 261

原创 查看签名文件

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

原创 tablelayout 适配列宽

tableLayout.setStretchAllColumns(true);

2018-04-26 14:14:42 1146

原创 linearLayout 排版

layout.setOrientation(LinearLayout.VERTICAL);

2018-04-26 13:16:19 313

原创 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

原创 handler

handler.obtainMessage().sendToTarget();

2018-04-22 20:48:20 100

原创 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 3277

原创 TextView 设置 Style

myTextview.setTextAppearance(this, R.style.mystyle);

2018-04-21 19:00:37 10295

原创 按下背景 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 155

原创 layer-list

layer-list

2018-04-20 16:35:24 147

原创 instrumentation

instrumentation

2018-04-20 14:36:10 518

原创 tablelayout标线

<TableLayout android:showDividers="middle|beginning|end" android:divider="@drawable/shape_table_diver" ></TableLayout><?xml version="1.0" encoding="utf-8"?>&lt

2018-04-20 09:51:08 346

原创 靠左居中 style

<TextView android:gravity="left|center_vertical"/>

2018-04-19 16:00:54 1885

原创 textview长度

Paint paint = new Paint(); paint.setTextSize(textView.getTextSize()); float size = paint.measureText(textView.getText().toString());

2018-04-19 14:27:22 281

原创 scrollview 不显示但功能可行

android:scrollbars="none"

2018-04-19 10:36:31 405

原创 计时器

Timer timer = new Timer();timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { } }, 0, 1000L);...timer.cancel();

2018-04-19 09:16:48 171

原创 eclipse高亮失效

https://pan.baidu.com/s/1aci6L_nj74jnlYyIGRqDfA

2018-04-18 22:49:05 721

原创 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 382

原创 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 869

原创 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

原创 粗体 style

android:textStyle = "bold"

2018-04-17 11:34:38 1000

原创 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"&amp

2018-04-16 12:44:06 828

SDPTXml.zip

xml解析测试工具

2021-05-30

QWidget给qt3dStudio发信号

利用QOpenGLContext和QWindow对象创建的Q3DSSurfaceViewer对象将加载uia文件并利用Q3DSDataInput对象传递参数

2021-01-25

qwindow与qt3dStudio结合

qtwidget下调用qt3dstudio制作的uip和uia文件

2021-01-22

qml与qwidget结合的checkbox

qml与qwidget结合的checkbox 勾选部分使用了qml, 说明部分使用了QLabel, 通过qml和qwidget交互实现checkbox功能。另QLabel本身不支持clicked事件, 在此自己封装了一层clicked事件。

2021-01-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除