mixer-a
BlogJava
::
首頁(yè)
::
新隨筆
::
聯(lián)系
::
聚合
::
管理
posts - 101, comments - 29, trackbacks - 0
常用鏈接
我的隨筆
我的評(píng)論
我的參與
最新評(píng)論
留言簿
給我留言
查看公開留言
查看私人留言
隨筆檔案
(101)
2012年8月 (2)
2012年7月 (13)
2012年6月 (6)
2012年5月 (6)
2012年4月 (26)
2012年3月 (16)
2012年2月 (17)
2012年1月 (15)
我的連接
a
iteye
csdn
www.javady.com
www.javady.com
搜索
最新評(píng)論
1.?re: android開發(fā)我的新浪微博客戶端-登錄頁(yè)面UI篇(4.1)[未登錄](méi)
仿真時(shí)提示:No Launcher activity found!
--小龍
2.?re: android開發(fā)我的新浪微博客戶端-登錄頁(yè)面UI篇(4.1)[未登錄](méi)
“新建名LoginActivity.java的Activity并且在AndroidManifest.xml中進(jìn)行相應(yīng)配置”請(qǐng)問(wèn)怎么進(jìn)行配置?因?yàn)樾陆ǖ腖oginActivity.java無(wú)法啟動(dòng)仿真。
--小龍
3.?re: JS 時(shí)間處理和格式轉(zhuǎn)換
@Wanlic2008
不用把時(shí)間的年份拿出來(lái)單獨(dú)分析
--Wanlic2008
4.?re: JS 時(shí)間處理和格式轉(zhuǎn)換
評(píng)論內(nèi)容較長(zhǎng),點(diǎn)擊標(biāo)題查看
--Wanlic2008
5.?re: Android進(jìn)階2之Http連接GET/POST請(qǐng)求
有用
--許大海
閱讀排行榜
1.?JS 時(shí)間處理和格式轉(zhuǎn)換(41192)
2.?Android進(jìn)階2之Activity之間數(shù)據(jù)交流(onActivityResult的用法)(11506)
3.?[原]Android應(yīng)用程序發(fā)送廣播(sendBroadcast)的過(guò)程分析(7305)
4.?[原]Android應(yīng)用程序鍵盤(Keyboard)消息處理機(jī)制分析(4909)
5.?并行計(jì)算框架的Java實(shí)現(xiàn)--系列一(3793)
評(píng)論排行榜
1.?你想不到的壓縮方法:將javascript文件壓縮成PNG圖像存儲(chǔ)(4)
2.?MyEclipse快捷鍵設(shè)置(4)
3.?開發(fā)流程那些事:6天時(shí)間修改1行代碼(3)
4.?JS 時(shí)間處理和格式轉(zhuǎn)換(3)
5.?也談 GET 和 POST 的區(qū)別(2)
Android學(xué)習(xí)筆記技巧之給文本加邊框
BorderTextViews.java
package xiaosi.BorderTextView; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.util.AttributeSet; import android.widget.TextView; public class BorderTextViews extends TextView { private Paint paint = null; private int color = Color.GRAY; public BorderTextViews(Context context, AttributeSet attrs) { super(context, attrs); } //設(shè)置邊框顏色 public void setPaintColor(int color){ this.color = color; } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); paint = new Paint(); //給邊框設(shè)置顏色 paint.setColor(color); //上 canvas.drawLine(0, 0, this.getWidth()-1, 0, paint); //左 canvas.drawLine(0, 0, 0, this.getHeight()-1, paint); //下 canvas.drawLine(0, this.getHeight()-1, this.getWidth()-1, this.getHeight()-1, paint); //右 canvas.drawLine(this.getWidth()-1, 0, this.getWidth()-1, this.getHeight()-1, paint); } }
package xiaosi.BorderTextView; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; public class BorderTextViewActivity extends Activity { /** Called when the activity is first created. */ private BorderTextViews borderTextView = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); borderTextView = (BorderTextViews)findViewById(R.id.Border); borderTextView.setPaintColor(Color.GRAY); } }
main.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="#CCFF66"> <xiaosi.BorderTextView.BorderTextViews android:id="@+id/Border" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#C71585" android:layout_marginTop="20dp" android:padding="10dp" android:layout_gravity="center" android:text="在畫布上畫邊框" /> </LinearLayout>
posted on 2012-02-23 17:05
mixer-a
閱讀(437)
評(píng)論(0)
編輯
收藏
新用戶注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問(wèn)
管理
Powered by:
BlogJava
Copyright ©2025 mixer-a
主站蜘蛛池模板:
当阳市
|
乐昌市
|
平顺县
|
远安县
|
高平市
|
师宗县
|
奈曼旗
|
弥勒县
|
隆德县
|
玉山县
|
临沂市
|
柳江县
|
儋州市
|
江川县
|
镇坪县
|
宁城县
|
彰武县
|
壶关县
|
克拉玛依市
|
漳州市
|
文成县
|
司法
|
潞城市
|
织金县
|
兰西县
|
成安县
|
兴仁县
|
嵊泗县
|
靖州
|
靖安县
|
峨山
|
蒙城县
|
贵定县
|
松江区
|
长沙县
|
米林县
|
玛曲县
|
松溪县
|
龙口市
|
沾化县
|
崇仁县
|