Another skill you will need for this exercise is the ability write to the Android Logs. More information can be found here, but essentially you write a Java statement like this in your code:
We’ve used Log.i() here which stands for an "information" level log. You have these other options as well:
- e(String, String) (error)
- w(String, String) (warning)
- i(String, String) (information)
- d(String, String) (debug)
- v(String, String) (verbose)
TextView içindeki değeri alıp, Log'a yazıyoruz.
<TextView android:id="@+id/menu_item_1"
public void printToLogs(View view) { // Find first menu item TextView and print the text to the logs TextView menuItem1 = (TextView) findViewById(R.id.menu_item_1); String input1 = menuItem1.getText().toString(); Log.i("EnterpriseActivity.java", input1);
Hiç yorum yok:
Yorum Gönder