Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid one activity to to popup window
    text
    copied!<p>My requirement is : List all sales route &amp; highlight default, It should be first option. If the salesperson select other option(not selected default), then popup window should come. The popup window contain one form, it talk to DB.After submit the popup window form , it return previous screen , It need to allow to go other position.</p> <p>See my code</p> <p>This initial list Activity: </p> <pre><code> ArrayList&lt;Object&gt; routeList = getWmRoute(); ArrayList&lt;String&gt; routhPath = new ArrayList&lt;String&gt;(); for(int i = 0; i&lt;routeList.size();i++){ routhPath.add(((WMRoute) routeList.get(i)).getDescription()); } ArrayAdapter ad = new ArrayAdapter(this,android.R.layout.simple_list_item_single_choice,routhPath); setListAdapter(ad); final ListView list=getListView(); list.setChoiceMode(ListView.CHOICE_MODE_SINGLE); list.setItemsCanFocus(true); list.setTextFilterEnabled(true); list.setItemChecked(0,true); list.setSelection(0); </code></pre> <p>This is listener method </p> <pre><code> @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); if(position !=0 ){ Bundle bundle = new Bundle(); int postion = position; String aString = Integer.toString(postion); bundle.putString("positon", aString); Intent showContent = new Intent(getApplicationContext(),SalesRouteDevitionActivity.class); // startActivityForResult(showContent,0); startActivity(showContent); } } </code></pre> <p>This is my SalesRouteDevitionActivity class</p> <pre><code> array_spinner=new String[2]; array_spinner[0]="Rain"; array_spinner[1]="Floods"; Bundle bundle = this.getIntent().getExtras(); param1 = bundle.getString("param1"); Spinner s = (Spinner) findViewById(R.id.spinner1); ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, array_spinner); s.setAdapter(adapter); final Button button = (Button) findViewById(R.id.submit); button.setOnClickListener(new OnClickListener() { public void onClick(View v) { Toast.makeText(SalesRouteDevitionActivity.this, "Beep Bop", Toast.LENGTH_SHORT).show(); Intent showContent = new Intent(getApplicationContext(),SalesRouteActivity.class); Bundle bundle = new Bundle(); bundle.putString("position", param1); Intent mIntent = new Intent(); mIntent.putExtras(bundle); setResult(RESULT_OK, mIntent); finish(); startActivity(showContent); } }); </code></pre> <p>This is my manifest file</p> <pre><code> &lt;activity android:theme="@android:style/Theme.Dialog" android:name=".SalesRouteDevitionActivity" android:label="Sales Route Diviation"&gt; &lt;/activity&gt; </code></pre> <p>After finish pop window work , how we can go to previous activity that particular place?</p> <p>Please help me...</p> <p>Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload