Permalink
Browse files

Fixed startup crash ?

  • Loading branch information...
1 parent ba85e51 commit fd9c5dc2be03535b1471f281ee933d42470a9004 @wongjustin99 wongjustin99 committed Apr 5, 2012
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -32,8 +32,7 @@
android:textColor="#ff8c00"
android:textSize="20dp"
android:textStyle="bold" />
-
- <ListView
+ <ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="61dp"
@@ -31,11 +31,11 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.main);
application = (MyApp) getApplication();
loadUserNameDisplay();
-
+
View v = findViewById(R.id.selection_button_createprofile);
v.setOnClickListener(this);
-
-
+
+
}
private void loadUserNameDisplay() {
@@ -57,11 +57,11 @@ private void loadUserNameDisplay() {
b.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.TOP);
toBePut.add(b);
}*/
-
+
adapter = new MyListAdapter(this, R.layout.row, usernames);
setListAdapter(adapter);
-
-
+
+
}
public void onClick(View v) {
@@ -71,14 +71,14 @@ public void onClick(View v) {
} else { //this means it should be one of the dynamic buttons.
}
}
-
+
protected void onNewIntent(Intent i) {
if(i.getAction().equals("Go to Home")) {
Intent intent = new Intent(this, HomeScreen.class);
this.startActivity(intent);
}
}
-
+
protected void onResume() {
super.onResume();
loadUserNameDisplay();
@@ -89,17 +89,17 @@ protected void onResume() {
private ArrayList<String> items;
private Context context;
private OnClickListener lis;
-
+
public MyListAdapter(Context context, int textViewResourceId, ArrayList<String> objects) {
super(context, textViewResourceId, objects);
items = objects;
this.context = context;
}
-
+
public void setOnClickListener(OnClickListener o) {
this.lis = o;
}
-
+
public View getView (int position, View convertView, ViewGroup parent) {
View v = convertView;
final String name = items.get(position);

0 comments on commit fd9c5dc

Please sign in to comment.