Modified EditEvent to use radiobuttons
This commit is contained in:
@@ -18,6 +18,7 @@ import org.json.JSONArray;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -41,6 +42,9 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
private Date mEventDateTime;
|
private Date mEventDateTime;
|
||||||
private RadioGroup mEventTypeRg;
|
private RadioGroup mEventTypeRg;
|
||||||
private boolean mEventTypesListChanged = false;
|
private boolean mEventTypesListChanged = false;
|
||||||
|
private RadioGroup mEventSubTypeRg;
|
||||||
|
private boolean mEventSubTypesListChanged = false;
|
||||||
|
private JSONObject mEventObj;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -52,6 +56,13 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
Long eventId = extras.getLong("eventId");
|
Long eventId = extras.getLong("eventId");
|
||||||
Log.v(TAG, "onCreate - eventId=" + eventId);
|
Log.v(TAG, "onCreate - eventId=" + eventId);
|
||||||
|
mEventId = eventId;
|
||||||
|
mWac.getEvent(mEventId, (JSONObject eventObj) -> {
|
||||||
|
mEventObj = eventObj;
|
||||||
|
updateUi();
|
||||||
|
// FIXME: modify updateUi to use mEventObj
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
mUtil = new OsdUtil(this, serverStatusHandler);
|
mUtil = new OsdUtil(this, serverStatusHandler);
|
||||||
|
|
||||||
@@ -63,12 +74,8 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
|
|
||||||
mEventTypeRg = findViewById(R.id.eventTypeRg);
|
mEventTypeRg = findViewById(R.id.eventTypeRg);
|
||||||
mEventTypeRg.setOnCheckedChangeListener(onEventTypeChange);
|
mEventTypeRg.setOnCheckedChangeListener(onEventTypeChange);
|
||||||
ListView lv;
|
mEventSubTypeRg = findViewById(R.id.eventSubTypeRg);
|
||||||
//lv = (ListView) findViewById(R.id.eventTypeLv);
|
mEventSubTypeRg.setOnCheckedChangeListener(onEventSubTypeChange);
|
||||||
//lv.setOnItemClickListener(onEventTypeClick);
|
|
||||||
lv = (ListView) findViewById(R.id.eventSubTypeLv);
|
|
||||||
lv.setOnItemClickListener(onEventSubTypeClick);
|
|
||||||
|
|
||||||
|
|
||||||
mWac = new WebApiConnection(this, this, this, this);
|
mWac = new WebApiConnection(this, this, this, this);
|
||||||
mLm = new LogManager(this);
|
mLm = new LogManager(this);
|
||||||
@@ -130,19 +137,30 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
private void updateUi() {
|
private void updateUi() {
|
||||||
Log.v(TAG, "updateUI");
|
Log.v(TAG, "updateUI");
|
||||||
TextView tv;
|
TextView tv;
|
||||||
// tv = (TextView) findViewById(R.id.tokenTv);
|
RadioButton b;
|
||||||
//tv.setText("Logged in with Token:" + storedAuthToken);
|
|
||||||
|
|
||||||
// Regenerate event type button group if necessary
|
tv = (TextView) findViewById(R.id.eventIdTv);
|
||||||
|
if (mEventId != null) {
|
||||||
|
tv.setText(mEventId.toString());
|
||||||
|
} else {
|
||||||
|
tv.setText(R.string.waitingForData);
|
||||||
|
}
|
||||||
|
|
||||||
|
tv = (TextView) findViewById(R.id.eventDateTv);
|
||||||
|
if (mEventDateTime != null) {
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String dateStr = dateFormat.format(mEventDateTime);
|
||||||
|
tv.setText(dateStr);
|
||||||
|
} else {
|
||||||
|
tv.setText(R.string.waitingForData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Populate event type button group if necessary
|
||||||
if (mEventTypesList != null && mEventTypesListChanged) {
|
if (mEventTypesList != null && mEventTypesListChanged) {
|
||||||
Log.v(TAG, "updateUi: " + mEventTypesList.toString());
|
Log.v(TAG, "updateUi: " + mEventTypesList.toString());
|
||||||
//ListView lv = (ListView) findViewById(R.id.eventTypeLv);
|
|
||||||
//ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
|
||||||
// R.layout.event_type_list_item, R.id.eventTypeTv, mEventTypesList);
|
|
||||||
//lv.setAdapter(adapter);
|
|
||||||
mEventTypeRg.removeAllViews();
|
mEventTypeRg.removeAllViews();
|
||||||
for (String eventTypeStr : mEventTypesList) {
|
for (String eventTypeStr : mEventTypesList) {
|
||||||
RadioButton b = new RadioButton(this);
|
b = new RadioButton(this);
|
||||||
b.setText(eventTypeStr);
|
b.setText(eventTypeStr);
|
||||||
mEventTypeRg.addView(b);
|
mEventTypeRg.addView(b);
|
||||||
}
|
}
|
||||||
@@ -150,7 +168,6 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the correct button in the event type group
|
// Check the correct button in the event type group
|
||||||
RadioButton b;
|
|
||||||
for (int index = 0; index < mEventTypeRg.getChildCount(); index++) {
|
for (int index = 0; index < mEventTypeRg.getChildCount(); index++) {
|
||||||
b = (RadioButton) mEventTypeRg.getChildAt(index);
|
b = (RadioButton) mEventTypeRg.getChildAt(index);
|
||||||
String buttonText = b.getText().toString();
|
String buttonText = b.getText().toString();
|
||||||
@@ -160,32 +177,34 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Populate the event sub-types radio button list.
|
||||||
if (mEventSubTypesHashMap != null) {
|
Log.v(TAG,"updateUi() - meventsubtypeshashmap="+mEventSubTypesHashMap+", mEventSubtypesListChanged="+mEventSubTypesListChanged);
|
||||||
|
if (mEventSubTypesHashMap != null && mEventSubTypesListChanged) {
|
||||||
|
Log.v(TAG,"UpdateUi() - populating event sub types list");
|
||||||
if (mEventTypeStr != null) {
|
if (mEventTypeStr != null) {
|
||||||
// based on https://androidexample.com/create-a-simple-listview
|
// based on https://androidexample.com/create-a-simple-listview
|
||||||
ArrayList<String> subtypesArrayList = mEventSubTypesHashMap.get(mEventTypeStr);
|
ArrayList<String> subtypesArrayList = mEventSubTypesHashMap.get(mEventTypeStr);
|
||||||
Log.v(TAG, "setSubtypesLV - eventType=" + mEventTypeStr + ", subtypes=" + subtypesArrayList);
|
Log.v(TAG, "updateUi() - eventType=" + mEventTypeStr + ", subtypes=" + subtypesArrayList);
|
||||||
ListView lv = (ListView) findViewById(R.id.eventSubTypeLv);
|
mEventSubTypeRg.removeAllViews();
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
for (String eventSubTypeStr : subtypesArrayList) {
|
||||||
R.layout.event_sub_type_list_item, R.id.eventSubTypeTv, subtypesArrayList);
|
b = new RadioButton(this);
|
||||||
lv.setAdapter(adapter);
|
b.setText(eventSubTypeStr);
|
||||||
|
mEventSubTypeRg.addView(b);
|
||||||
|
}
|
||||||
|
mEventSubTypesListChanged = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tv = (TextView) findViewById(R.id.eventTypeTv);
|
// And show the correct sub-type selected.
|
||||||
if (mEventTypeStr != null) {
|
for (int index = 0; index < mEventSubTypeRg.getChildCount(); index++) {
|
||||||
tv.setText(mEventTypeStr);
|
b = (RadioButton) mEventSubTypeRg.getChildAt(index);
|
||||||
} else {
|
String buttonText = b.getText().toString();
|
||||||
tv.setText(R.string.selectFromOptionselow);
|
if (buttonText.equals(mEventSubTypeStr)) {
|
||||||
}
|
Log.v(TAG, "updateUi - selecting button " + mEventSubTypeStr);
|
||||||
tv = (TextView) findViewById(R.id.eventSubTypeTv);
|
b.setChecked(true);
|
||||||
if (mEventSubTypeStr != null) {
|
}
|
||||||
tv.setText(mEventSubTypeStr);
|
|
||||||
} else {
|
|
||||||
tv.setText(R.string.selectFromOptionselow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // updateUi()
|
||||||
|
|
||||||
View.OnClickListener onCancel =
|
View.OnClickListener onCancel =
|
||||||
new View.OnClickListener() {
|
new View.OnClickListener() {
|
||||||
@@ -211,37 +230,7 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private void setSubTypesLV(String eventType) {
|
|
||||||
// based on https://androidexample.com/create-a-simple-listview
|
|
||||||
ArrayList<String> subtypesArrayList = mEventSubTypesHashMap.get(eventType);
|
|
||||||
Log.v(TAG, "setSubtypesLV - eventType=" + eventType + ", subtypes=" + subtypesArrayList);
|
|
||||||
ListView lv = (ListView) findViewById(R.id.eventSubTypeLv);
|
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
|
||||||
R.layout.event_sub_type_list_item, R.id.eventSubTypeTv, subtypesArrayList);
|
|
||||||
lv.setAdapter(adapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
AdapterView.OnItemClickListener onEventTypeClick =
|
|
||||||
new AdapterView.OnItemClickListener() {
|
|
||||||
public void onItemClick(AdapterView<?> adapter, View v, int position, long id) {
|
|
||||||
Log.v(TAG, "onEventTypeClick() - Position=" + position + ", id=" + id);// Confirmation dialog based on: https://stackoverflow.com/a/12213536/2104584
|
|
||||||
mEventTypeStr = (String) adapter.getItemAtPosition(position);
|
|
||||||
Log.v(TAG, "onEventTypeClick - selected " + mEventTypeStr);
|
|
||||||
updateUi();
|
|
||||||
//setSubTypesLV(selectedEventType);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AdapterView.OnItemClickListener onEventSubTypeClick =
|
|
||||||
new AdapterView.OnItemClickListener() {
|
|
||||||
public void onItemClick(AdapterView<?> adapter, View v, int position, long id) {
|
|
||||||
Log.v(TAG, "onEventSubTypeClick() - Position=" + position + ", id=" + id);// Confirmation dialog based on: https://stackoverflow.com/a/12213536/2104584
|
|
||||||
mEventSubTypeStr = (String) adapter.getItemAtPosition(position);
|
|
||||||
Log.v(TAG, "onEventSubTypeClick - selected " + mEventSubTypeStr);
|
|
||||||
updateUi();
|
|
||||||
//setSubTypesLV(selectedEventType);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
RadioGroup.OnCheckedChangeListener onEventTypeChange =
|
RadioGroup.OnCheckedChangeListener onEventTypeChange =
|
||||||
new RadioGroup.OnCheckedChangeListener() {
|
new RadioGroup.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -250,8 +239,22 @@ public class EditEventActivity extends AppCompatActivity
|
|||||||
RadioButton b = (RadioButton)findViewById(group.getCheckedRadioButtonId());
|
RadioButton b = (RadioButton)findViewById(group.getCheckedRadioButtonId());
|
||||||
String selectedEventType = b.getText().toString();
|
String selectedEventType = b.getText().toString();
|
||||||
mEventTypeStr = selectedEventType;
|
mEventTypeStr = selectedEventType;
|
||||||
|
mEventSubTypesListChanged = true;
|
||||||
|
Log.v(TAG,"onEventTypeChange() - mEventSubTypesListChanged="+mEventSubTypesListChanged);
|
||||||
|
updateUi();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
RadioGroup.OnCheckedChangeListener onEventSubTypeChange =
|
||||||
|
new RadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
|
Log.v(TAG,"onEventSubTypeChange() - id="+checkedId);
|
||||||
|
RadioButton b = (RadioButton)findViewById(group.getCheckedRadioButtonId());
|
||||||
|
String selectedEventSubType = b.getText().toString();
|
||||||
|
mEventSubTypeStr = selectedEventSubType;
|
||||||
updateUi();
|
updateUi();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -218,6 +218,54 @@ public class WebApiConnection {
|
|||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getEvent(Long eventId, Consumer<JSONObject> callback) {
|
||||||
|
Log.v(TAG, "getEvent()");
|
||||||
|
String urlStr = mUrlBase + "/api/events/"+eventId;
|
||||||
|
Log.v(TAG, "getEvent(): urlStr=" + urlStr);
|
||||||
|
final String authtoken = getStoredToken();
|
||||||
|
|
||||||
|
if (!isLoggedIn()) {
|
||||||
|
Log.v(TAG, "not logged in - doing nothing");
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
|
||||||
|
StringRequest req = new StringRequest(Request.Method.GET, urlStr,
|
||||||
|
new Response.Listener<String>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(String response) {
|
||||||
|
Log.v(TAG, "Response is: " + response);
|
||||||
|
try {
|
||||||
|
JSONObject retObj = new JSONObject(response);
|
||||||
|
callback.accept(retObj);
|
||||||
|
} catch (JSONException e) {
|
||||||
|
Log.e(TAG,"getEventTypes.onRespons(): Error: "+e.getMessage()+","+e.toString());
|
||||||
|
callback.accept(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Response.ErrorListener() {
|
||||||
|
@Override
|
||||||
|
public void onErrorResponse(VolleyError error) {
|
||||||
|
String responseBody = new String(error.networkResponse.data);
|
||||||
|
Log.v(TAG, "Create Event Error: " + error.toString() + ", message:" + error.getMessage() + ", Response Code:" + error.networkResponse.statusCode + ", Response: " + responseBody);
|
||||||
|
callback.accept(null);
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> getHeaders() throws AuthFailureError {
|
||||||
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
|
params.put("Content-Type", "application/json; charset=UTF-8");
|
||||||
|
params.put("Authorization", "Token " + getStoredToken());
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mQueue.add(req);
|
||||||
|
return (true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public boolean createDatapoint(JSONObject dataObj, int eventId) {
|
public boolean createDatapoint(JSONObject dataObj, int eventId) {
|
||||||
Log.v(TAG, "createDatapoint()");
|
Log.v(TAG, "createDatapoint()");
|
||||||
// Create a new event in the remote database, based on the provided parameters.
|
// Create a new event in the remote database, based on the provided parameters.
|
||||||
|
|||||||
@@ -4,116 +4,119 @@
|
|||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="64dp"
|
android:layout_height="wrap_content">
|
||||||
android:background="#FFFFFF"
|
|
||||||
android:contentDescription="@string/app_name"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@drawable/star_of_life_24x24" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="EventId: " />
|
android:orientation="horizontal">
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="EventId: " />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/eventIdTv"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="[id]" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="[id]" />
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Event Date: " />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/eventDateTv"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="..." />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/event_type"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/eventTypeRg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"></RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/event_sub_type"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/eventSubTypeRg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"></RadioGroup>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/eventNotsTv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginRight="4dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:hint="notes about event" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/cancelBtn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/cancel" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/OKBtn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/save" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:text="@string/event_type" />
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:text="event_type"
|
|
||||||
android:id="@+id/eventTypeTv"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<RadioGroup
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/eventTypeRg">
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
<!--<ListView
|
|
||||||
android:id="@+id/eventTypeLv"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="150dp"
|
|
||||||
android:layout_marginTop="0dp" />
|
|
||||||
-->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:text="@string/event_sub_type" />
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="event_sub_type"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:id="@+id/eventSubTypeTv"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/eventSubTypeLv"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="150dp"
|
|
||||||
android:layout_marginTop="10dp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/eventNotsTv"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginRight="4dp"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:hint="notes about event" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/cancelBtn"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/cancel" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/OKBtn"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/save" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -322,5 +322,6 @@
|
|||||||
<string name="save">Save</string>
|
<string name="save">Save</string>
|
||||||
<string name="event_type">Event Type:</string>
|
<string name="event_type">Event Type:</string>
|
||||||
<string name="event_sub_type">"Event Sub-Type: "</string>
|
<string name="event_sub_type">"Event Sub-Type: "</string>
|
||||||
<string name="selectFromOptionselow"><![CDATA[<Select from Options Below>]]></string>
|
<string name="selectFromOptionselow">"-- select option --"</string>
|
||||||
|
<string name="waitingForData">...waiting for data...</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user