Select views
-2 TextViews, 1 Button
Position views
-Use LinearLayout as parent ViewGroup for these 3 children view set LinearLayout orientation to be vertical
Style views
-Quanity header should be in all caps
-Quantity value should be in black font color
-Add spacing between views
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android." xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical" android:paddingLeft="@dimen/activity_horizontal" android:paddingRight="@dimen/activity_horizontal" android:paddingTop="@dimen/activity_vertical" android:orientation="vertical" tools:context=".MainActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:text="Quantity" android:textAllCaps="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0" android:textSize="16sp" adnroid:textColor="@android:color/black" /> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginTop="16dp" android:text="Order" /> </LinearLayout>
button android
https://developer.android.com/reference/android/widget/Button.html
conversation list activity
Java file -> MainActivity.java
package com.example.android.justjava; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.View; import android.widget.TextView; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu){ // Inflate the menu; this adds items to the action getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item){ int id = item.getItemId(); if ( id == R.id.action_settings){ } } }
comments java
http://journals.ecs.soton.ac.uk/java/tutorial/getStarted/application/comments.html