筆記 day 2
##按下button會出現其他文字
運用onClink 連接副加檔
##可調整字型、字的顏色、大小
預設字體大小 int Size=15
ViewName.setTextColor(Color.DKGRAY);
Color.rgb(0, 150, 170) 土耳其藍 --自定顏色
可上www.color-hex.com查代碼
Color.parseColor(#123456)
ViewName.setTextSize(Size++) 每按一次,字會變大
ViewName.setTextSize(20);
##按下 button會出現對應文字
##LinearLayout 調整版面 水平、垂直
##fill-parent填滿, match-parent平均分配, wrap-parent依字數大小
##if 如果條件成立,就執行此程式
if(RadioName.isChecked()==true)
{
RadioView.set("Yes, I did.")
}
##Else if (xxx.isChecked()==true) {} 如果條件成立,就執行此程式
##Radiobutton, containers /RadioGroup 只能單選
##1.MainActivity extends Activity implements RadioButton onCheckedChangeListener
按alt+enter,設定監聽器 →好處不用按送出鍵
2.設定宣示變數
xxx.setOnCheckedChangeListener(this)
3.public void xxxxx(){}
4.public void onCheckChanged(CompoundButton bottonView, boolean isChecked){}
開新分頁File/New/Activity/Blank Activity
勾選Launcher Activity 表起始畫面
java & Layout 都會變成兩個頁面
但 intent-filter 只能有一個
APP/manifests/AndroidManifest.xml
##CheckBox 可以複選
kkkrest.setText(kkkrest.getText()+"")
運用onClink 連接副加檔
##可調整字型、字的顏色、大小
預設字體大小 int Size=15
ViewName.setTextColor(Color.DKGRAY);
Color.rgb(0, 150, 170) 土耳其藍 --自定顏色
可上www.color-hex.com查代碼
Color.parseColor(#123456)
ViewName.setTextSize(Size++) 每按一次,字會變大
ViewName.setTextSize(20);
##按下 button會出現對應文字
##LinearLayout 調整版面 水平、垂直
##fill-parent填滿, match-parent平均分配, wrap-parent依字數大小
##if 如果條件成立,就執行此程式
if(RadioName.isChecked()==true)
{
RadioView.set("Yes, I did.")
}
##Else if (xxx.isChecked()==true) {} 如果條件成立,就執行此程式
##Radiobutton, containers /RadioGroup 只能單選
##1.MainActivity extends Activity implements RadioButton onCheckedChangeListener
按alt+enter,設定監聽器 →好處不用按送出鍵
2.設定宣示變數
xxx.setOnCheckedChangeListener(this)
3.public void xxxxx(){}
4.public void onCheckChanged(CompoundButton bottonView, boolean isChecked){}
開新分頁File/New/Activity/Blank Activity
勾選Launcher Activity 表起始畫面
java & Layout 都會變成兩個頁面
但 intent-filter 只能有一個
APP/manifests/AndroidManifest.xml
##CheckBox 可以複選
kkkrest.setText(kkkrest.getText()+"")
留言