12 2012 档案
摘要:1.自定义字体可以使用setTypeface(Typeface)方法来设置文本框内文本的字体,而android的Typeface又使用TTF字体文件来设置字体所以,我们可以在程序中放入TTF字体文件,在程序中使用Typeface来设置字体:第一步,在assets目录下新建fonts目录,把TTF字体文件放到这里。第二步,程序中调用:TextViewtv = (TextView)findViewById(R.id.textView);AssetManagermgr=getAssets();//得到AssetManagerTypefacetf=Typeface.createFromAsset(mg
阅读全文
摘要:如果需要更加详细的资料请查阅JavaSE API文档,谢谢别人辛勤的劳动。转载地址:http://www.cnblogs.com/adamzuocy/archive/2010/03/08/1680851.htmlwait、notify、notifyall、synchronized的使用机制:synchronized(obj) {while(!condition) {obj.wait();}obj.doSomething();}当线程A获得了obj锁后,发现条件condition不满足,无法继续下一处理,于是线程A就wait() , 放弃对象锁.之后在另一线程B中,如果B更改了某些条件,使得线程
阅读全文
摘要:<!-- 微博 --> <style name="weibosdk_ContentOverlay" parent="android:style/Theme.Dialog"> <item name="android:windowNoTitle">true</item> 没有标题 <item name="android:windowIsTranslucent">true</item> 透明 <item name="android:w
阅读全文
摘要:转载地址:http://blog.csdn.net/fengkuanghun/article/details/7904284背景介绍在开发应用过程中经常会遇到显示一些不同的字体风格的信息犹如默认的LockScreen上面的时间和充电信息。对于类似的情况,可能第一反应就是用不同的多个TextView来实现,对于每个TextView设置不同的字体风格以满足需求。这里推荐的做法是使用android.text.*;和 android.text.style.*;下面的组件来实现RichText:也即在同一个TextView中设置不同的字体风格。对于某些应用,比如文本编辑,记事本,彩信,短信等地方,还必须
阅读全文
摘要:转载地址:http://blog.csdn.net/fengkuanghun/article/details/7878862如何实现将View向上平移自身高度一半的距离?TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0,Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0.5f);mView.startAnimation(translate);问题:
阅读全文