-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive UI Overhual, added a startup menu and compeletely revamped al…
…l colors and views for the different components of the app.
- Loading branch information
Showing
15 changed files
with
197 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
|
||
<corners | ||
android:radius="10sp"/> | ||
|
||
<solid | ||
android:color="@color/medium_blue"/> | ||
|
||
</shape> |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
|
||
<corners | ||
android:radius="10sp"/> | ||
|
||
<solid | ||
android:color="@color/bright_blue"/> | ||
|
||
</shape> |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
android:radius="10sp"/> | ||
|
||
<solid | ||
android:color="@color/bg_blue"/> | ||
android:color="@color/bright_blue"/> | ||
|
||
</shape> |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<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: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=".StartupActivity" | ||
android:background="@color/dark_blue" > | ||
|
||
<ImageView | ||
android:id="@+id/central_image" | ||
android:layout_margin="10sp" | ||
android:padding="5sp" | ||
android:background="@drawable/result_img_bg" | ||
android:src="@drawable/cell_phone_placeholder" | ||
android:layout_width="200sp" | ||
android:layout_centerInParent="true" | ||
android:layout_height="200sp" | ||
android:contentDescription="@string/place_holder_short"/> | ||
|
||
<TextView | ||
android:id="@+id/main_title" | ||
android:layout_width="wrap_content" | ||
android:layout_above="@id/central_image" | ||
android:layout_height="wrap_content" | ||
android:textColor="@color/white" | ||
android:layout_centerHorizontal="true" | ||
android:textStyle="bold" | ||
android:textSize="42sp" | ||
android:text="@string/app_name" /> | ||
|
||
<Button | ||
android:id="@+id/start_button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/central_image" | ||
android:layout_centerHorizontal="true" | ||
android:padding="3sp" | ||
android:layout_margin="20sp" | ||
android:text="@string/start" | ||
android:onClick="go" | ||
android:textColor="@color/white" | ||
android:textSize="26sp" | ||
android:background="@drawable/button_shape"/> | ||
|
||
</RelativeLayout> |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<item | ||
android:id="@+id/action_settings" | ||
android:orderInCategory="100" | ||
android:showAsAction="never" | ||
android:title="@string/action_settings"/> | ||
|
||
</menu> |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package ca.unbc.cpsc472.mynextphone; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.Menu; | ||
import android.view.View; | ||
|
||
public class StartupActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_startup); | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(Menu menu) { | ||
// Inflate the menu; this adds items to the action bar if it is present. | ||
getMenuInflater().inflate(R.menu.startup, menu); | ||
return true; | ||
} | ||
|
||
public void go(View v){ | ||
Intent i = new Intent(this, QuestionActivity.class); | ||
this.startActivity(i); | ||
} | ||
|
||
} |
This file contains 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 characters
46 changes: 46 additions & 0 deletions
46
src/ca/unbc/cpsc472/mynextphone/models/TextListAdapter.java
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package ca.unbc.cpsc472.mynextphone.models; | ||
|
||
import java.util.ArrayList; | ||
|
||
import android.content.Context; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.BaseAdapter; | ||
|
||
public class TextListAdapter extends BaseAdapter { | ||
|
||
private ArrayList<QuestionAnswer> theItems; | ||
private Context context; | ||
|
||
public TextListAdapter(Context c, ArrayList<QuestionAnswer> theItems){ | ||
this.theItems = theItems; | ||
this.context = c; | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return theItems.size(); | ||
} | ||
|
||
@Override | ||
public Object getItem(int arg0) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
public QuestionAnswer getAnswer(int i){ | ||
return theItems.get(i); | ||
} | ||
|
||
@Override | ||
public long getItemId(int arg0) { | ||
// TODO Auto-generated method stub | ||
return 0; | ||
} | ||
|
||
@Override | ||
public View getView(int arg0, View arg1, ViewGroup arg2) { | ||
return theItems.get(arg0).getView(context); | ||
} | ||
|
||
} |