1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

AndroidGCS: Updating and saving objects now works.

This commit is contained in:
James Cotton 2012-08-05 04:42:28 -05:00
parent cd6a2fb7da
commit 0d5140a67d
2 changed files with 13 additions and 4 deletions

View File

@ -19,7 +19,7 @@ import android.widget.TextView;
public class ObjectEditView extends GridLayout {
String objectName;
List<View> fields;
public List<View> fields;
public ObjectEditView(Context context) {
super(context);

View File

@ -7,13 +7,21 @@ import org.openpilot.uavtalk.UAVObject;
import org.openpilot.uavtalk.UAVObjectField;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
public class ObjectEditor extends ObjectManagerActivity {
static final String TAG = "ObjectEditor";
String objectName;
int objectID;
int instID;
long objectID;
long instID;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -98,6 +106,7 @@ public class ObjectEditor extends ObjectManagerActivity {
if (obj == null)
return false;
Log.d(TAG, "Updating object id " + obj.getObjID());
ObjectEditView editView = (ObjectEditView) findViewById(R.id.object_edit_view);
int field_idx = 0;