<xml>
創(chuàng)新互聯(lián)建站專注于企業(yè)成都全網(wǎng)營銷推廣、網(wǎng)站重做改版、延邊朝鮮族網(wǎng)站定制設計、自適應品牌網(wǎng)站建設、HTML5建站、商城網(wǎng)站定制開發(fā)、集團公司官網(wǎng)建設、外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應式網(wǎng)頁設計等建站業(yè)務,價格優(yōu)惠性價比高,為延邊朝鮮族等各大城市提供網(wǎng)站開發(fā)制作服務。
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
br/>xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
br/>tools:showIn="@layout/activity_main">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
其中,wrap_content為強制擴充來顯示textview中的內(nèi)容
<MainActivity>
package com.mycompany.helloworld;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {//寫方法時繼承自Activity@Override//偽代碼,表示方法重寫
br/>@Override//偽代碼,表示方法重寫
super.onCreate(savedInstanceState);
//調(diào)用Activity的onCreate方法,和Activity必須搭配使用
setContentView(R.layout.activity_main);//setContentView將Activity與xml可視化文件關聯(lián)的代碼
}
}
當前標題:Helloworld代碼解釋
URL鏈接:http://chinadenli.net/article2/jiesoc.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供面包屑導航、服務器托管、電子商務、網(wǎng)站排名、定制開發(fā)、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)