`
timingliu
  • 浏览: 32510 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
一、所有Activty界面全去掉: 修改AndroidManifest.xml 在application 标签中添加android:theme="@android:style/Theme.NoTitleBar"   二、代码方式及对某个Activty有效: 在onCreate中增加:requestWindowFeature(Window.FEATURE_NO_TITLE);   void onCreate(Bundle savedInstanceState) { ... requestWindowFeature(Window.FEATURE_NO_TI ...
关键是取得Window         Window w=getWindow();   修改边框:         w.setBackgroundDrawableResource(rc);         rc为资源ID 改变位置:         WindowManager.LayoutParams wl = w.getAttributes();         wl.x = xNewPos;         wl.y = yNewPos;         w.setAttributes(wl); 1、对话框缺省居中wl.x=0,wl.y=0      新坐标 x小 ...
因开发需要在根目录下创建一目录,但缺省根目录是只读的,google了一下,使用remount方式使根目录可写。 参考博文:http://www.sofee.cn/blog/category/technical/android-technical/ 中的部分内容   步骤如下: adb shell连接系统后 #mount mount rootfs / rootfs ro 0 0 ...   # mount -o remount,rw rootfs /   #mount mount rootfs / rootfs rw 0 0 ...   此后就可在根目录下创建自己 ...
1、将xxx.ttf复制到项目的assets目录下。 2、TextView中使用该font        Typeface someFont = Typeface.createFromAsset(getContext().getAssets(), "xxx.ttf");        tt.setTypeface(someFont); //tt为TextView        tt.setTextSize(24);
决定在小组内部使用Subversion做为此次项目的版本控制系统,公司的VSS系统不适合作为Java项目的版本控制,增加删除文件有些麻烦(重构了一下,改了类名,类文件名也跟着改了)。   从 http://www.visualsvn.com/server/download/ 下载VisualSVN Server 找台windows机器,一路安装好后,从其提供的管理界面上就可很容易地增加用户及设定每个库的使用权限。 全部配置好后用事先装的TortoiseSVN一试成功!   感觉用VisualSVN Server真的好方便,比用Apache+svn自己从头开始配server容易多了, ...
Android中不能跨线程控制其它线程中创建的控件, 还好google提供了Handler,可通过消息机制来与其它界面通讯了。   使用Handler又有了开发Windows程序中的消息循环的感觉了, 界面流程控制容易了很多,操作进度条对话框什么的也容易些了。   开始有些喜欢用Android开发了。
Adapter 中getView使用时需要判断convertView是否为null,若不为null则只需更新该view的数据及状态即可。若重新创建:1、速度慢,2、很快会耗尽内存(android内部可能会保持对该view的引用) 代码片断:     public class AppsAdapter extends BaseListAdapter {         public View getView(int position, View convertView, ViewGroup parent) {             String msg = (String)getItem( ...
如果遇到非代码问题,首先考虑是否是访问权限问题 wifi;数据库访问;媒体播放... Android权限控制很细,一时还不适应
1、修改AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android"       ...> 下增加:    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 否则会因缺少权限而取不到MAC信息   2、取MAC代码片断    WifiManager wifiManager = (WifiManager) g ...
Global site tag (gtag.js) - Google Analytics