Start other service bugfix attempt
This commit is contained in:
parent
54f3cc84c4
commit
b72049defc
@ -29,6 +29,7 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
EditText etParameterName, etParameterValue, etPackageName, etActivityOrActionPath, etClassName;
|
EditText etParameterName, etParameterValue, etPackageName, etActivityOrActionPath, etClassName;
|
||||||
Button bSelectApp, bAddIntentPair, bSaveActionStartOtherActivity, showStartProgramExamples;
|
Button bSelectApp, bAddIntentPair, bSaveActionStartOtherActivity, showStartProgramExamples;
|
||||||
Spinner spinnerParameterType;
|
Spinner spinnerParameterType;
|
||||||
|
RadioGroup rgAppStartupType;
|
||||||
boolean edit = false;
|
boolean edit = false;
|
||||||
ProgressDialog progressDialog = null;
|
ProgressDialog progressDialog = null;
|
||||||
RadioButton rbStartAppSelectByActivity, rbStartAppSelectByAction, rbStartAppByActivity, rbStartAppByBroadcast, rbStartAppByService, rbStartAppByForegroundService;
|
RadioButton rbStartAppSelectByActivity, rbStartAppSelectByAction, rbStartAppByActivity, rbStartAppByBroadcast, rbStartAppByService, rbStartAppByForegroundService;
|
||||||
@ -87,11 +89,14 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
rbStartAppByBroadcast = (RadioButton)findViewById(R.id.rbStartAppByBroadcast);
|
rbStartAppByBroadcast = (RadioButton)findViewById(R.id.rbStartAppByBroadcast);
|
||||||
rbStartAppByService = (RadioButton)findViewById(R.id.rbStartAppByService);
|
rbStartAppByService = (RadioButton)findViewById(R.id.rbStartAppByService);
|
||||||
rbStartAppByForegroundService = (RadioButton)findViewById(R.id.rbStartAppByForegroundService);
|
rbStartAppByForegroundService = (RadioButton)findViewById(R.id.rbStartAppByForegroundService);
|
||||||
|
rgAppStartupType = (RadioGroup)findViewById(R.id.rgAppStartupType);
|
||||||
|
|
||||||
intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionStartActivity.supportedIntentTypes);
|
intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionStartActivity.supportedIntentTypes);
|
||||||
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
||||||
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
etClassName.setEnabled(false);
|
||||||
|
|
||||||
intentPairAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, intentPairList);
|
intentPairAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, intentPairList);
|
||||||
bSelectApp.setOnClickListener(new OnClickListener()
|
bSelectApp.setOnClickListener(new OnClickListener()
|
||||||
{
|
{
|
||||||
@ -301,8 +306,6 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
{
|
{
|
||||||
bSelectApp.setEnabled(isChecked);
|
bSelectApp.setEnabled(isChecked);
|
||||||
}
|
}
|
||||||
bug
|
|
||||||
etClassName.setEnabled(!isChecked);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -316,6 +319,23 @@ bug
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rgAppStartupType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup radioGroup, int i)
|
||||||
|
{
|
||||||
|
if(rbStartAppByActivity.isChecked())
|
||||||
|
etClassName.setEnabled(false);
|
||||||
|
else if (rbStartAppByBroadcast.isChecked())
|
||||||
|
etClassName.setEnabled(false);
|
||||||
|
else if(rbStartAppByService.isChecked())
|
||||||
|
etClassName.setEnabled(true);
|
||||||
|
else if(rbStartAppByForegroundService.isChecked())
|
||||||
|
etClassName.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Intent i = getIntent();
|
Intent i = getIntent();
|
||||||
if(i.hasExtra(ActivityManageRule.intentNameActionParameter1))
|
if(i.hasExtra(ActivityManageRule.intentNameActionParameter1))
|
||||||
loadValuesIntoGui(i);
|
loadValuesIntoGui(i);
|
||||||
|
@ -113,6 +113,7 @@
|
|||||||
android:text="@string/startAppStartType" />
|
android:text="@string/startAppStartType" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
android:id="@+id/rgAppStartupType"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user