---恢復內容開始---html
"@android: "
將自動顯示資源列表startActivity(intent);
app
->res
-> layout
-> 相應的活動佈局
中View Text
、Toast
、Alert Dialog
、notification
。LinnearLayout
是一種最簡單的佈局方式,能夠將子視圖以相同的方式(水平或垂直)對齊。
android:orientation="horizontal"
或android:orientation="vetical"
//前者水平、後者垂直RelativeLayout
是根據一個或者多個同級視圖的位置來肯定他們的位置的。
FrameLayout
講一個視圖放在另外一個視圖之上。android:
android:allowBackup="true"、
android:icon="@mipmap/ic_launcher"、
android:label="@string/app_name"、
android:roundIcon="@mipmap/ic_launcher_round" `和· android:supportsRtl="true"·問題1解決方案:
後面兩個據我所知應該分別是APP的圖標和名字吧。
至於android:roundIcon="@mipmap/ic_launcher_round" 這個屬性是設置圓形圖片的,若是你有的話,放進去,沒有的話設置同一張或者刪掉不寫這個屬性,有些手機換主題會使用這個屬性
最後就是java
> > public class MainActivity extends AppCompatActivity { > private Button button1; > @Override > protected void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.activity_main); > button1 = (Button)findViewById(R.id.button1); > button1.setOnClickListener(new OnClickListener() { > @Override > public void onClick(View v) { > AlertDialog.Builder dialog = new AlertDialog.Builder(MainActivity.this); > dialog.setTitle("標題"); > dialog.setMessage("你要繼續麼?"); > dialog.setCancelable(false); > dialog.setPositiveButton("繼續", new DialogInterface.OnClickListener() { > @Override > public void onClick(DialogInterface dialogInterface, int i) { > Intent intent = new Intent(MainActivity.this,ThirdActivity.class); > startActivity(intent); > } > }); > dialog.setNegativeButton("退出", new DialogInterface.OnClickListener() { > @Override > public void onClick(DialogInterface dialogInterface, int i) { > > } > }); > dialog.show(); > } > }); > } > }
雖然有連接,可是我並無Git上傳呀!
第九週一會兒總結了兩週的錯題,因此這周就沒有了[第九周博客](https://www.cnblogs.com/dky-wzw/p/9004756.html)
代碼行數(新增/累積) | 博客量(新增/累積) | 學習時間(新增/累積) | 重要成長 | |
---|---|---|---|---|
目標 | 5000行 | 30篇 | 400小時 | |
第一週 | 075/200 | 1/1 | 05/20 | |
第二週 | 560/500 | 1/2 | 13/38 | |
第三週 | 972/1000 | 1/4 | 21/60 | |
第四周 | 694/1666 | 1/5 | 21/90 | |
第五週 | 1544/3095 | 1/6 | 30/90 | |
第六週 | 600/3627 | 1/7 | 30/120 | |
第七週 | 544/4200 | 2/9 | 20/140 | |
第八週 | 907/5107 | 2/10 | 20/160 | |
第九周 | 700/5807 | 1/11 | 20/180 | |
第十週 | 900/6782 | 2/13 | 20/200 | |
第十一週 | 500/7282 | 2/15 | 20/220 |