interview:developer:android:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
interview:developer:android:start [2017/08/10 20:37] – [Basic] don.leeinterview:developer:android:start [2019/07/28 15:36] (current) – old revision restored (2017/08/16 11:25) don.lee
Line 3: Line 3:
 ===== Basic ===== ===== Basic =====
  
-Suppose you have a v-shape array, e.g [1, 12, 31, 44, 51, 54, 23, 22, 10]. How to find the maximum value in a v-shape array?+==== Question ====
  
-假如我们有一个v-shape数组,如[1, 12, 31, 44, 51, 54, 23, 22, 10]。怎样找出它的最大值?+  * Suppose you have a v-shape array, e.g [1, 12, 31, 44, 51, 54, 23, 22, 10]. How to find the maximum value in a v-shape array? 
 +  * 假如我们有一个v-shape数组,如[1, 12, 31, 44, 51, 54, 23, 22, 10]。怎样找出它的最大值?
  
  
Line 11: Line 12:
 ===== Android ===== ===== Android =====
  
-==== Question ====+==== Question ====
  
   * Describe three common use cases for using an Intent.   * Describe three common use cases for using an Intent.
 +  * 请说出 Intent 三个常用案例。
  
-==== Question ====+==== Question ====
  
   * Under what condition could the code sample below crash your application? How would you modify the code to avoid this potential problem? Explain your answer.   * Under what condition could the code sample below crash your application? How would you modify the code to avoid this potential problem? Explain your answer.
 +  * 在什麽情况下以下代码会崩溃?你可以怎样避免?请解释。
  
 <code> <code>
Line 27: Line 30:
 </code> </code>
  
-==== Question ====+==== Question ====
  
   * What is the relationship between the life cycle of an AsyncTask and an Activity? What problems can this result in? How can these problems be avoided?   * What is the relationship between the life cycle of an AsyncTask and an Activity? What problems can this result in? How can these problems be avoided?
 +  * AsyncTask 和 Activity 的生命周期有什麽関系?这个関系有可能导致什麽问题?你可以如何避免?
  
-==== Question ====+==== Question ====
  
   * What is difference between Serializable and Parcelable ? Which is best approach in Android ?   * What is difference between Serializable and Parcelable ? Which is best approach in Android ?
 +  * Serializable 和 Parcelable 有什麽分别?那一个在安卓使用比较好?
 +
 +==== Question 6 ====
 +
 +
 +
 +  * Write down the log results at 4 different cases
 +    * Start MainActivity
 +    * Invoke onClick() at MainActivity
 +    * User press back button from ActivityTwo
 +    * Start ActivityThree
 +
 +  * 我们有以下三段代码,请分别写下以下四种执行后log的结果
 +    * 开始MainActivity
 +    * 触发onClick() at MainActivity
 +    * 用户在ActivityTwo按back button
 +    * 开始ActivityThree
  
-==== Question 5 ==== 
  
 <code> <code>
 public class MainActivity extends Activity implements OnClickListener { public class MainActivity extends Activity implements OnClickListener {
-  
   final String TAG = "States";   final String TAG = "States";
-  
   Button btnActTwo;   Button btnActTwo;
    
Line 48: Line 66:
     super.onCreate(savedInstanceState);     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);     setContentView(R.layout.main);
-  
     btnActTwo = (Button) findViewById(R.id.btnActTwo);     btnActTwo = (Button) findViewById(R.id.btnActTwo);
     btnActTwo.setOnClickListener(this);     btnActTwo.setOnClickListener(this);
-  
     Log.d(TAG, "MainActivity: onCreate()");     Log.d(TAG, "MainActivity: onCreate()");
   }   }
Line 97: Line 113:
   }   }
 } }
 +</code>
  
 +<code>
 public class ActivityTwo extends Activity { public class ActivityTwo extends Activity {
-  
   final String TAG = "States";   final String TAG = "States";
    
Line 145: Line 162:
   }   }
 } }
 +</code>
  
 +<code>
 public class ActivityThree extends Activity { public class ActivityThree extends Activity {
-  
   final String TAG = "States";   final String TAG = "States";
    
Line 195: Line 213:
 } }
 </code> </code>
- 
-  * Write down the log results at 4 different cases 
-    * Start MainActivity 
-    * Invoke onClick() at MainActivity 
-    * User press back button from ActivityTwo 
-    * Start ActivityThree 
- 
  
  
  • interview/developer/android/start.1502368645.txt.gz
  • Last modified: 2017/08/10 20:37
  • by don.lee