随笔分类 -  Android

摘要:http://www.cnblogs.com/yann/archive/2010/09/10/1823110.html文章很好~只是小菜鸟我现在有些看不懂= = 阅读全文
posted @ 2012-09-14 16:28 石沉溪涧 阅读(230) 评论(0) 推荐(0)
摘要:1.OptionsMenu (选项菜单)用法总结使用方法:方法一:添加菜单项:onCreateOptionsMenu(Menu menu)中添加menu.add(Menu.NONE,Menu.FIRST+1,5,"删除").setIcon()------>添加选择菜单项事件:在onOptionsItemSelected(MenuItem item)中 switch(item.getItemId()),然后添加对应选择事件------>添加关闭菜单事件:onOptionsMenuClosed(Menu menu),在其中添加代码即可-------->添加准备 阅读全文
posted @ 2012-07-21 20:59 石沉溪涧 阅读(19591) 评论(0) 推荐(3)
摘要:1.概念盛放tab的容器。可以通过两种方式实现:方法一:不继承tabActibity,通过setup()建立tabhost;通过setcontent()获取页面布局。但是布局文件的格式有规范。必须是tabhost 包含 tabwidget(id必须为tabs);tabhost还包含 framelay... 阅读全文
posted @ 2012-07-16 08:39 石沉溪涧 阅读(7377) 评论(0) 推荐(1)
摘要:android:ellipsize="end"android:lines="1"android:singleLine="true" 阅读全文
posted @ 2012-07-15 16:33 石沉溪涧 阅读(134) 评论(0) 推荐(0)
摘要:方法一:在***Mainifest.xml中 <application>节点中加入 android:theme="@style/AppTheme"方法二:public void onCreate(Bundle savedInstanceState) {this.requestWindowFeature(Window.FEATURE_NO_TITLE);super.onCreate(savedInstanceState);}要写在super..前面 ,即在建立之前去掉头部 阅读全文
posted @ 2012-07-14 19:14 石沉溪涧 阅读(256) 评论(0) 推荐(0)
摘要:方法一:setMovementMethod方法 TextView tv=(TextView)findViewById(R.id.TextView1);tv.setMovementMethod(ScrollingMovementMethod.getInstance()); 方法二:利用ScrollView<ScrollView android:layout_width="wrap_content"android:layout_height="wrap_content" ><TextViewandroid:id="@+id/Tex 阅读全文
posted @ 2012-07-13 20:37 石沉溪涧 阅读(335) 评论(0) 推荐(0)
摘要:英文释义:Hierarchy--分层。单词意思即为分层视图。功能:层次Viewer允许你调试和优化您的用户界面。还可以学习别人做好的UI界面,它提供了一个布局的视图层次结构(布局视图)的视觉表现和放大的显示检查员(像素完美查看)。使用: 1.用模拟器运行你要查看的项目 2.打开HierarchyVi... 阅读全文
posted @ 2012-07-12 09:00 石沉溪涧 阅读(3785) 评论(0) 推荐(0)
摘要:1.ADT的安装: eclipse菜单栏 Help-InstallNewsoftware; 在work with中输入网址:ADT - https://dl-ssl.google.com/android/eclipse ;或者 ADT - http://dl-ssl.google.com/android/eclipse; 全选Develper Tools ,安装 完成2.SDK的引用 前言:由于sdk在线下载安装很慢,所以建议下载到本地。方便以后装系统或者eclipse出问题时直接引用sdk即可。 方法:eclipse菜单栏window-preferences-android 将sdk所在目录 阅读全文
posted @ 2012-04-26 17:38 石沉溪涧 阅读(453) 评论(0) 推荐(0)