码迷,mamicode.com
首页 >  
搜索关键字:view    ( 37068个结果
android 之 surfaceView的使用
在继承SurfaceView的类中即使重写了onDraw()方法也是没有用的,因为SurfaceView虽然继承自View,但并没重写onDraw(),其子类可以重写onDraw()但并不能自动调用解决办法:首先SurfaceView的子类XXX要 implements SurfaceHolder....
分类:其他好文   时间:2015-05-03 14:33:26    阅读次数:176
UILabel和TextView手动换行
UILabel 的换行符是 '\n';例如:1 _explainsNotificationLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)];2 _explains...
分类:其他好文   时间:2015-05-03 13:14:42    阅读次数:425
ListView优化-ViewHolder的优化备份
ViewHolder.javapackage cn.edu.bzu.util;import android.content.Context;import android.util.SparseArray;import android.view.LayoutInflater;import androi...
分类:其他好文   时间:2015-05-03 13:13:59    阅读次数:133
Android -- RecyclerView
"A flexible view for providing a limited window into a large data set."可以说是ListView的升级版,ListVie中我们需要自己写ViewHolder,当然你也可以不写,是在RecylerView中,是要让写的哟~Recyc...
分类:移动开发   时间:2015-05-03 13:12:39    阅读次数:728
ListView优化-通用CommonAdapter编写备份
【ps:CommonAdapter基于ViewHolder工具类】CommonAdapter.javapackage cn.edu.bzu.util;import android.content.Context;import android.view.LayoutInflater;import an...
分类:其他好文   时间:2015-05-03 13:11:46    阅读次数:146
手写代码UI,xib和StoryBoard间的的优劣比较
在UI制作方面,逐渐分化三种主要流派:使用代码手写UI;使用单个xib文件组织viewController或者view;使用StoryBoard来通过单个或很少的几个文件构建UI。三种方式各有优劣,也各有自己最适用的场合。一、手写代码UI1、优势 √ 适合大型项目大规模使用,利于版本管理、追...
分类:其他好文   时间:2015-05-03 11:59:05    阅读次数:173
【S1】2.生命周期相关 & something
本文仅给出可能性以便查阅。生命周期非常重要,故不再细说。1. 实现监听Button的方法有四种匿名内部类直接实现,即用即销毁。activity继承onClickListener接口,实现onClick(View v);Button安装监听器为this。单独实现,另写一个类实现listener配置实现...
分类:其他好文   时间:2015-05-03 11:55:11    阅读次数:113
兔子--android开发中 java.lang.IllegalThreadStateException: Thread already started
原因:thread的没有停止,就又去启动这个线程了, 解决办法:我只列出了关键代码:  btnStart.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 new Thread...
分类:移动开发   时间:2015-05-03 10:43:15    阅读次数:309
LayoutInflater的inflate函数用法详解
LayoutInflater的inflate函数用法详解 LayoutInflater作用是将layout的xml布局文件实例化为View类对象。 获取LayoutInflater的方法有如下三种: ? LayoutInflater inflater=(LayoutInflater)context.getSyste...
分类:其他好文   时间:2015-05-03 10:41:12    阅读次数:121
状态栏的字体颜色设置为白色
第一步:在info.plist中添加一个字段:view controller -base status bar 设置为NO第二步:在#import "AppDelegate.m"里添加:- (BOOL)application:(UIApplication *)application didFinis...
分类:其他好文   时间:2015-05-02 23:18:01    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!