上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: 一、 drawLine(),drawText(),drawCircle()二、两种基本的绘图方式 onDraw(Canvas canvas){ canvas.drawBitmap(bitmap,10,10,null);//方法一 drawable.draw(canvas);//方法二 } 阅读全文
posted @ 2013-07-14 21:58 谈笑风生膜法师 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 一、继承控件类、组合方式、绘制控件 1.View的工作原理 2.编写View类 3.为View类增加属性 4.绘制屏幕 5.响应用户消息 6.自定义回调函数二、 主要是实现重载onDraw函数,通过Canvas类来重绘视图三、 编写attrs.xml文件 format对应自定义变量 的类型四、 在构造函数里面,通过TypedArray typedArray = context.obtainStyledAttributes(attrs,R.styleable.IconTextView);//TypedArray是存放资源的a... 阅读全文
posted @ 2013-07-13 16:28 谈笑风生膜法师 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 1、LinearLayout 垂直布局时,每一行就只有一个元素,多个元素依次垂直往下;水平布局时,只有一行,每一个元素依次向右排列. 线性布局中,有4个及其重要的参数,直接决定元素的布局和位置,这四个参数是 android:layout_gravity (是本元素相对于父元素的重力方向) android:gravity(是本元素所有子元素的重力方向) android:orientation(线性布局以列或行来显示内部子元素) android:layout_weight(线性布局内子元素对未占用空间【水平或垂直】分配权重值,其值越小,权重越大。 前提是子元素设置了android:l... 阅读全文
posted @ 2013-07-13 01:07 谈笑风生膜法师 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Linux下1.获取repo脚本文件(python脚本)curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repochmod a+x ~/bin/repo2.选择分支repo init -u https://android.googlesource.com/platform/mainfestrepo init -u https://android.googlesource.com/platform/mainfest =b android-4.0.1_r13.同步 repo sync(国内时间很长)Li 阅读全文
posted @ 2013-07-12 23:08 谈笑风生膜法师 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 转载 阅读全文
posted @ 2013-07-12 10:16 谈笑风生膜法师 阅读(4376) 评论(0) 推荐(0) 编辑
摘要: package org.hjw.addgestest;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterface;import android.content.DialogInterface.OnClickListener;import android.gesture.Gesture;import android.gesture.GestureLibraries;import android.gesture.G 阅读全文
posted @ 2013-07-10 18:19 谈笑风生膜法师 阅读(2979) 评论(0) 推荐(0) 编辑
摘要: package org.hjw.flipper;import android.os.Bundle;import android.app.Activity;import android.graphics.drawable.AnimationDrawable;import android.view.GestureDetector;import android.view.GestureDetector.OnGestureListener;import android.view.Menu;import android.view.MotionEvent;import android.view.View; 阅读全文
posted @ 2013-07-08 16:38 谈笑风生膜法师 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: package org.hjw.minibrowser;import android.os.Bundle;import android.app.Activity;import android.view.KeyEvent;import android.view.Menu;import android.view.View;import android.webkit.WebSettings;import android.webkit.WebView;import android.webkit.WebViewClient;import android.widget.Button;import andr 阅读全文
posted @ 2013-07-07 23:25 谈笑风生膜法师 阅读(540) 评论(0) 推荐(0) 编辑
摘要: Server: 1 package org.hjw.server; 2 3 import java.io.IOException; 4 5 import java.net.ServerSocket; 6 import java.net.Socket; 7 import java.util.ArrayList; 8 9 public class Server {10 11 public static ArrayList socketList = new ArrayList();12 13 public static void main(String[] args) thro... 阅读全文
posted @ 2013-07-06 10:37 谈笑风生膜法师 阅读(1042) 评论(0) 推荐(0) 编辑
摘要: ps:1.Fragment和Activity类似,都有类似的生命周期,但Fragment的生命周期受Activity控制 2.四种子类:DialogFragment (对话框界面) 、ListFragment(列表界面)、PreferenceFrag·ment(选项设置界面)、WebViewFragment(WebView界面) 3.Activity与Fragment的通信,可通过Callbacks接口,一般重写onCreateView()方法实现作为显示的组件,当然如果直接继承了子类,则只需要设置适配器即可,显示 Fragment: 1.使用android:name="& 阅读全文
posted @ 2013-07-05 14:44 谈笑风生膜法师 阅读(197) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页