Add generic menus, and implement a basic layout for alert settings.
I should commit more often, sorry...
BIN
res/drawable-hdpi/ic_action_directions.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
res/drawable-hdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 456 B |
BIN
res/drawable-hdpi/ic_action_view_as_list.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
res/drawable-mdpi/ic_action_directions.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
res/drawable-mdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
res/drawable-mdpi/ic_action_view_as_list.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
res/drawable-xhdpi/ic_action_directions.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
res/drawable-xhdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
res/drawable-xhdpi/ic_action_view_as_list.png
Normal file
After Width: | Height: | Size: 341 B |
BIN
res/drawable-xxhdpi/ic_action_directions.png
Normal file
After Width: | Height: | Size: 821 B |
BIN
res/drawable-xxhdpi/ic_action_settings.png
Normal file
After Width: | Height: | Size: 671 B |
BIN
res/drawable-xxhdpi/ic_action_view_as_list.png
Normal file
After Width: | Height: | Size: 441 B |
@ -1,16 +1,34 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
android:layout_width="fill_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="fill_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=".Alerts" >
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/alerts_label_alerts_to_receive"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/hello_world" />
|
android:text="@string/alerts_label_alerts_to_receive"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<CheckBox
|
||||||
|
android:id="@+id/alerts_check_timed"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/alerts_check_timed"
|
||||||
|
android:onClick="onClickTimedAlerts" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/alerts_check_organizations"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/alerts_check_organizations"
|
||||||
|
android:onClick="onClickOrganizationAlerts" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/alerts_check_university"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/alerts_check_university"
|
||||||
|
android:onClick="onClickUniversityAlerts" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -1,9 +0,0 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_alert_settings"
|
|
||||||
android:orderInCategory="100"
|
|
||||||
android:showAsAction="never"
|
|
||||||
android:title="@string/action_alert_settings"/>
|
|
||||||
|
|
||||||
</menu>
|
|
12
res/menu/base.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item android:id="@+id/action_parking" android:title="@string/title_activity_parking" android:icon="@drawable/ic_action_directions" android:orderInCategory="50"></item><item android:id="@+id/action_registration" android:icon="@drawable/ic_action_view_as_list" android:title="@string/title_activity_registration" android:orderInCategory="200"/><item
|
||||||
|
android:id="@+id/action_alert_settings"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
android:title="@string/action_alert_settings"
|
||||||
|
android:icon="@drawable/ic_action_settings"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</menu>
|
@ -1,10 +0,0 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_alert_settings"
|
|
||||||
android:orderInCategory="100"
|
|
||||||
android:showAsAction="ifRoom"
|
|
||||||
android:title="@string/action_alert_settings"
|
|
||||||
android:icon="@drawable/ic_action_warning"/>
|
|
||||||
|
|
||||||
</menu>
|
|
@ -1,9 +0,0 @@
|
|||||||
<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_alert_settings"/>
|
|
||||||
|
|
||||||
</menu>
|
|
@ -1,9 +0,0 @@
|
|||||||
<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_alert_settings"/>
|
|
||||||
|
|
||||||
</menu>
|
|
@ -7,5 +7,9 @@
|
|||||||
<string name="title_activity_parking">Parking</string>
|
<string name="title_activity_parking">Parking</string>
|
||||||
<string name="title_activity_registration">Registration</string>
|
<string name="title_activity_registration">Registration</string>
|
||||||
<string name="title_activity_alerts">Alerts</string>
|
<string name="title_activity_alerts">Alerts</string>
|
||||||
|
<string name="alerts_label_alerts_to_receive">Select Alerts to Receive:</string>
|
||||||
|
<string name="alerts_check_timed">Timed (Reserve Ticket...)</string>
|
||||||
|
<string name="alerts_check_organizations">Organizations</string>
|
||||||
|
<string name="alerts_check_university">University</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,6 +1,43 @@
|
|||||||
package com.uncc.gameday.activities;
|
package com.uncc.gameday.activities;
|
||||||
|
|
||||||
|
import com.uncc.gameday.R;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
|
||||||
public class Alerts extends MenuActivity {
|
public class Alerts extends MenuActivity {
|
||||||
|
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_alerts);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClickTimedAlerts(View view) {
|
||||||
|
if (((CheckBox) view).isChecked())
|
||||||
|
// Enable Timed alerts
|
||||||
|
;
|
||||||
|
else
|
||||||
|
// Disable Timed alerts
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClickOrganizationAlerts(View view) {
|
||||||
|
if (((CheckBox) view).isChecked())
|
||||||
|
// Enable Organization alerts
|
||||||
|
;
|
||||||
|
else
|
||||||
|
// Disable Organization alerts
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClickUniversityAlerts(View view) {
|
||||||
|
if (((CheckBox) view).isChecked())
|
||||||
|
// Enable University alerts
|
||||||
|
;
|
||||||
|
else
|
||||||
|
// Disable University alerts
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.uncc.gameday.activities;
|
package com.uncc.gameday.activities;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Home extends MenuActivity {
|
public class Home extends MenuActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
42
src/com/uncc/gameday/activities/MenuActivity.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package com.uncc.gameday.activities;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
|
||||||
|
import com.uncc.gameday.R;
|
||||||
|
|
||||||
|
public class MenuActivity extends Activity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_home);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
getMenuInflater().inflate(R.menu.base, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
switch (item.getItemId()){
|
||||||
|
case R.id.action_alert_settings:
|
||||||
|
startActivity(new Intent(this, Alerts.class));
|
||||||
|
break;
|
||||||
|
case R.id.action_registration:
|
||||||
|
startActivity(new Intent(this, Registration.class));
|
||||||
|
break;
|
||||||
|
case R.id.action_parking:
|
||||||
|
startActivity(new Intent(this, Parking.class));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|