摘要: 布局文件的代码:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" tools:context=& 阅读全文
posted @ 2013-04-01 22:21 夏至未至_星辰 阅读(484) 评论(0) 推荐(0)
摘要: 布局文件的代码:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:layout_width="fill_parent" android:layout 阅读全文
posted @ 2013-04-01 21:51 夏至未至_星辰 阅读(215) 评论(0) 推荐(0)
摘要: 建立一个安卓工程,新建一个MyGLSurfaceView继承GLSurfaceView并实现GLSurfaceView.Renderer接口MyGLSurfaceView类的代码public class MyGLSurfaceView extends GLSurfaceView implements GLSurfaceView.Renderer{ //储存OpenGL对象用到的顶点坐标和颜色 private FloatBuffer mVertBuf,mVertColorBuf; //储存OpenGL对象的顶点在mVertBuf中的索引 private ShortBuffer mInde... 阅读全文
posted @ 2013-04-01 11:47 夏至未至_星辰 阅读(352) 评论(0) 推荐(0)
摘要: 一、重上次关闭位置启动窗体 (1)获取用户的根首选项节点: public static Preferences userRoot() (2)向首选项保存整型数值: public abstract void putInt(Stirng key,int value) 参数:(1)key:要与字符串形式的value相关联的键 (2)value: 要与key相关联的字符串形式的值 (3)获取首选项中的整型数数值: public abstract int getInt(String key,int def) 参数:(1)key:要作为int返回其关联值的键 (2)def:此首选项节点不具有与k... 阅读全文
posted @ 2013-03-28 12:31 夏至未至_星辰 阅读(206) 评论(0) 推荐(0)
摘要: import java.awt.Color;import javax.swing.JSlider;import javax.swing.JFrame;import javax.swing.JPanel;import java.awt.Dimension;import java.awt.GridLayout;public class JSliderDemo{public static void main (String[] args){JSlider empty = new JSlider ();JSlider age = new JSlider (JSlider.VERTICAL, 0, 15 阅读全文
posted @ 2013-03-25 22:15 夏至未至_星辰 阅读(388) 评论(0) 推荐(0)