码迷,mamicode.com
首页 >  
搜索关键字:surfaceview layout mainactivity    ( 9645个结果
29 adapt
public View getView(int position, View convertView, ViewGroup parent) { View view = inflater.inflate(R.layout.gv_item, null); TextView tv = (TextV...
分类:其他好文   时间:2014-05-10 00:41:22    阅读次数:283
Android Layout Binder(在线将XML中View find出来,生成java代码的工具)
废话不多说,这是地址:http://android.lineten.net/layout.php。 有图有真相,例如: 你的XML假如是这样:     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation=...
分类:移动开发   时间:2014-05-09 15:20:54    阅读次数:424
Android学习 多读官网,有益健康---手势
官网地址 ttp://developer.android.com/training/gestures/detector.html: 一、可以直接覆盖Activity的onTouch方法 public class MainActivity extends Activity { ... // This example shows an Activity, but you w...
分类:移动开发   时间:2014-05-09 14:39:07    阅读次数:469
Android中fragment之间和Activity的传值、切换
介绍:功能介绍:通过一个activity下方的三个按钮,分别是发送消息(sendButton)、聊天记录(chatButton)、常用语(commonButton)。当单击按钮是,来切换上方的fragment,用以显示不同的内容。所用的知识点:当单击发送消息按钮时:1.从MainActivity中把...
分类:移动开发   时间:2014-05-09 09:36:34    阅读次数:511
android开发之 包含EditText组件 禁止自动获取焦点弹出输入法
在EditText标签的外层Layout中加入focusableInTouchMode属性android:focusableInTouchMode="true"即可。
分类:移动开发   时间:2014-05-08 17:37:00    阅读次数:307
Android Scrollview 内部组件android:layout_height="fill_parent"无效的解决办法
Found the solution myself in the end. The problem was not with theLinearLayout,but with theScrollView(seems weird, considering the fact that theScroll...
分类:移动开发   时间:2014-05-08 13:42:02    阅读次数:321
Android LayoutInflater详解
在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于findViewById()。不同点是LayoutInflater是用来找res/layout/下的xml布局文件,并且实例化;而findViewById()是找xml布局文件下的具体widget控件(如 Button、Te...
分类:移动开发   时间:2014-05-08 11:56:47    阅读次数:464
Android应用之《宋词三百首》(二)
接上回,上回我们讲到MainActivity里面将所有的宋词标题和作者显示到界面的ListView中去,我们接下来的工作是通过点击ListView的Item跳转到ContentActivity里面去显示单个宋词的全部内容,跳转代码如下: // 为ListView的Item设置点击监听器 mListView.setOnItemClickListener(new OnItemClickListe...
分类:移动开发   时间:2014-05-08 11:14:25    阅读次数:519
Android 单击图片切换效果
新建一个Android项目,命名为FrameLayout此实例主要操作src文件夹下的MainActivity.Java类文件和res/layout下的activity_main.xml布局文件1.布局主页面代码activity_main.xml↓ 2.Java代码MainAc...
分类:移动开发   时间:2014-05-08 07:38:14    阅读次数:375
app启动速度
跟踪代码发现,应用启动时的白屏会持续到draw调用完成,这个过程中任何耗时操作将导致白屏时间增长。1.adb shell am start -W -n yourpakagename/MainActivity-W: wait for launch to complete 这里的launch to co...
分类:移动开发   时间:2014-05-08 07:15:37    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!