需求:java
需求分析通常步驟:android
軟件項目需求分析git
產品經理經常使用軟件app
第27章主要介紹了5種控件佈局方法:ide
第28章主要介紹瞭如何處理事件和編寫監聽器(event listener)監聽點擊、長按、觸碰、按鍵等。函數
第29章主要介紹了爲操做欄添加溢出、操做和下拉式導航、爲溢出添加操做,添加回退功能。
第30章主要介紹了菜單的三種類型佈局
TableLayout | GridLayOut | |
---|---|---|
平分 | × | √ |
水平&垂直 同時對齊 | × | √ |
跨行列布局 | × | √ |
控件自動換行 | × | √ |
空白網格 | × | √ |
直接使用 | √ | 需設置 |
extend | LinarLayOut | ViewGroup |
Bundle mBundle = new Bundle(); //bundle類中加入數據(key -value的形式,另外一個activity裏面取數據的時候,就要用到key,找出對應的value) mBundle.putString("Data", "data from TestBundle"); //新建一個intent對象,並將該bundle加入這個intent對象 Intent intent = new Intent(); ntent.setClass(TestBundle.this, Target.class); intent.putExtras(mBundle);
Log.d(tag, message); /*快捷輸入 | 對應級別 logv + Tab | verbose logd + Tab | debug logi + Tab | info logw + Tab | warn loge + Tab | error */
android:theme=」@style/AppTheme
(appTheme主題或者其子類),而不能用android:style。 不然會提示錯誤:學習
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. /* 關係能夠這麼形容:AppCompatActivity————>FragmentActivity————>Activity。 */
public void onSaveInstanceState(Bundle savedInstanceState){ super.onSaveInstanceState(savedInsanceState); }
private class ButtonListener implements View.OnClickListener { public void onClick(View v) { switch (v.getId()) { case R.id.btn1_1: Intent a = new Intent(MainActivity.this, LinearLayOut1.class); startActivity(a); break; case R.id.btn1_2: Intent b = new Intent(MainActivity.this, LinearLayOut2.class); startActivity(b); break; case R.id.btn1_3: Intent c = new Intent(MainActivity.this, LinearLayOut3.class); startActivity(c); break; case R.id.btn2: Intent d = new Intent(MainActivity.this, RelativeLayOut.class); startActivity(d); break; case R.id.btn3: Intent e = new Intent(MainActivity.this, FrameLayOut.class); startActivity(e); break; case R.id.btn4: Intent f = new Intent(MainActivity.this, TableLayOut.class); startActivity(f); break; case R.id.btn5 Intent g = new Intent(MainActivity.this, GridLayOut.class); startActivity(g); break; default: break;} }}
public class Zebra implements Serializable { private static final long serialUID = 1L; private transient String name = "George"; private static String birthPlace = "Africa"; private transient Integer age; private java.util.List<Zebra> friends = new java.util.ArrayList<>(); private Object tail = null; { age = 10;} public Zebra() { this.name = "Sophia";} } }//name age /*代碼編譯並運行沒有問題,alUID與serialVersionUID不一樣,serialVersionUID是推薦的修補,但不是必需的,這不構成任何編譯問題。序列化過程不會使用serialUID進行版本控制。能力和年齡變量都是瞬態的,這意味着它們的值不會被保存。Upon deserialization,默認的初始化和構造函數將是跳過,它們都將爲空.*/
代碼行數(新增/累積) | 博客量(新增/累積) | 學習時間(新增/累積) | 重要成長 | |
---|---|---|---|---|
目標 | 5000行 | 30篇 | 400小時 | |
第一週 | ----- | ----- | ----- | |
第二週 | 180/180 | 2/3 | 18/18 | |
第三週 | 429/609 | 1/4 | 24/42 | |
第四周 | 588/1197 | 2/6 | 30/72 | |
第五週 | 548/1745 | 1/7 | 20/92 | |
第六週 | 15934/17679 | 2/9 | 20/112 | |
第七週 | 2390/20310 | 1/10 | 18/130 |