摘要: 引用:http://zhidao.baidu.com/question/297919794.html.自定义字体android Typeface使用TTF字体文件设置字体我们可以在程序中放入ttf字体文件,在程序中使用Typeface设置字体。第一步,在assets目录下新建fonts目录,把ttf字体文件放到这。第二步,程序中调用:AssetManager mgr=getAssets();//得到AssetManagerTypeface tf=Typeface.createFromAsset(mgr, "fonts/ttf.ttf");//根据路径得到Typefacetv 阅读全文
posted @ 2011-08-09 18:05 镇水古月 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 引用:http://www.cnblogs.com/GnagWang/archive/2010/12/08/1899747.htmlButton或者ImageButton的背景设为透明或者半透明半透明<Button android:background="#e0000000" ... />透明<Button android:background="#00000000" ... />颜色和不透明度 (alpha) 值以十六进制表示法表示。任何一种颜色的值范围都是 0 到 255(00 到 ff)。对于 alpha,00 表示完全透明 阅读全文
posted @ 2011-08-09 17:37 镇水古月 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 写在要跳转的事件中 Intent intent = new Intent(); intent.setClass(GameMainMenuActivity.this, GameSubmenuActivity.class); startActivity(intent); finish(); 阅读全文
posted @ 2011-08-09 14:05 镇水古月 阅读(215) 评论(0) 推荐(0) 编辑
摘要: android:textColor="#FFFFFFFF" 阅读全文
posted @ 2011-08-09 13:26 镇水古月 阅读(306) 评论(1) 推荐(0) 编辑
摘要: package mobi.game.tool.view;import android.content.Context;import android.util.AttributeSet;import android.view.KeyEvent;import android.view.MotionEvent;import android.widget.Gallery;/*** 重写Gallery,捕捉xy坐标,使其不会跑过头* **/public class DetialGallery extends Gallery { public DetialGallery(Context context , 阅读全文
posted @ 2011-08-09 13:23 镇水古月 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 参考:http://zhidao.baidu.com/question/253098596.htmldip,就是把屏幕的宽分成320分,高分成480分,无论你的分辨率为多少。比如你做一条160dip的横线,无论你在320还480的模拟器上,都是一半屏的长度。 阅读全文
posted @ 2011-08-09 13:21 镇水古月 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.cnblogs.com/topcoderliu/archive/2011/05/07/2039862.html (引用其中代码时Android 要改成 android)package mobi.game.adapter;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import mobi.game.gameProcess.R;import mobi.game.tool.view.MainMenuItemView;import 阅读全文
posted @ 2011-08-09 13:09 镇水古月 阅读(306) 评论(0) 推荐(0) 编辑