Created
June 27, 2015 23:27
Revisions
-
udacityandroid created this gist
Jun 27, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ package com.example.android.menu; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void printToLogs(View view) { // Find first menu item TextView and print the text to the logs // Find second menu item TextView and print the text to the logs // Find third menu item TextView and print the text to the logs } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <TextView android:id="@+id/menu_item_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Mango sorbet" android:textAppearance="?android:textAppearanceMedium" /> <TextView android:id="@+id/menu_item_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Blueberry pie" android:textAppearance="?android:textAppearanceMedium" android:textSize="18sp" /> <TextView android:id="@+id/menu_item_3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Chocolate lava cake" android:textAppearance="?android:textAppearanceMedium" android:textSize="18sp" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:onClick="printToLogs" android:text="Print menu to logs" /> </LinearLayout>