導航:首頁 > 操作系統 > 安卓main是什麼文件

安卓main是什麼文件

發布時間:2023-01-30 18:24:43

『壹』 怎麼打開android項目里的 main.xml文件

從源文件!打開方式用記事本!或者導入到開發工具裡面雙擊就打開了。

main.xml在源代碼源碼如下:

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//R.layout.main,就是在R.java中的R類定義的layout中main,格式為:R.layout.<layout的xml文件名字>,就是對應的res/layout/main.xml文件。
setContentView(R.layout.main);
TextView myTextView = (TextView) findViewById(R.id.myTextView);
myTextView.setText("我的Activity");
Button myButton = (Button) findViewById(R.id.myButton);
myButton.setText("我的按鈕");
}

閱讀全文

與安卓main是什麼文件相關的資料

熱點內容
cad印刷命令怎麼用 瀏覽:688
冷庫壓縮機轉速不穩定 瀏覽:970
8pe513編程 瀏覽:325
互聯網關閉根伺服器是什麼樣 瀏覽:929
1g的文件夾可以壓縮後發送么 瀏覽:761
php遠程請求 瀏覽:114
小說程序員哪有那麼可愛 瀏覽:183
將軍與命令游戲劇情 瀏覽:39
心理pdf 瀏覽:201
類似螃蟹通告的小程序源碼開發 瀏覽:227
單片機怎麼寫課設報告 瀏覽:324
壓縮文件損壞的md5會變嗎 瀏覽:550
選擇雲伺服器申請注冊 瀏覽:820
php前端模版 瀏覽:981
粵康碼app怎麼弄 瀏覽:367
次梁與剪力牆相交箍筋加密怎麼算 瀏覽:909
phpword轉換pdf 瀏覽:334
像程序員那麼可愛的電視劇有哪些 瀏覽:725
安卓機開不了機如何處理 瀏覽:759
怎麼樣壓縮文件在一個文件夾 瀏覽:93