Skip to content
Snippets Groups Projects
Commit 16b49d06 authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Creates basic interface.

parent a270d4b1
Branches
No related merge requests found
......@@ -43,4 +43,19 @@
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="" />
</component>
</project>
\ No newline at end of file
......@@ -4,13 +4,26 @@ import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class CounterActivity extends AppCompatActivity {
private Button mCounterButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_counter);
mCounterButton = (Button) findViewById(R.id.counter_button);
mCounterButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(CounterActivity.this, R.string.gather_toast, Toast.LENGTH_SHORT).show();
}
});
}
@Override
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<!--<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
......@@ -8,4 +9,32 @@
<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="24dp"
android:text="@string/counter_text" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:orientation="horizontal" >
<Button
android:id="@+id/counter_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/counter_button" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -3,4 +3,8 @@
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="counter_text">aa</string>
<string name="counter_button">Gather</string>
<string name="gather_toast">You\'ve gathered 20 things!</string>
</resources>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment