---恢复内容开始---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 |