Android developers

Android developers This page is about android Application development. discussions,asking questions about android Application development.

All the group members are allow to ask questions about android development

Ks group ki classified app
23/10/2017

Ks group ki classified app

  Development from Scratch to Create Cool Apps!http://learncoupon.com/p/rJQQ2y4Xe?utm_source=5Any programming language i...
09/10/2017

Development from Scratch to Create Cool Apps!
http://learncoupon.com/p/rJQQ2y4Xe?utm_source=5
Any programming language is just another language unless you learn it the right way. A programmer can not benefit from its features if she/he does not appreciate a Programming Language's core concepts.

We start learning Android Programming by understanding concepts and implementing them live!

03/10/2017

if anyone is interested in making google play console acount then contact me...

13/08/2017

For any question you can contact me at +923214788470

Android course details
16/11/2016

Android course details

12/11/2016

have an alertDialog with a few items. When an Item is selected, there are some Web services calls and only when they are done the dialog closes. I would like to let the user know he/she shold wait.

I've tried using progress bar and Toast. In the Toast version, if I just show the Toast, it does show - but only after the dialog was closed.

I also tried running the Toast on another thread, which caused the application to crash.

Here is some example of the code:

private void chooseFromClosestSamplePoints(final ArrayList places) {
if (null != places) {
final String[] items = new String[places.size()];
for (int i = 0; i < places.size(); i++) {
Place place = places.get(i);
String displayText = place.mfactoryName + "," + place.msamplePointName;
items[i] = displayText;
}

AlertDialog.Builder builder = new AlertDialog.Builder(
Main.this);
builder.setTitle(R.string.select_sample_point);
builder.setItems(items,
new DialogInterface.OnClickListener() {


public void onClick(DialogInterface dialog,
int which) {
Place place = places.get(which);
Toast toast = Toast.makeText(getApplicationContext(), "אנא המתן", Toast.LENGTH_LONG);
toast.show();
boolean res = selectPlace(place); //this is the long running WS call
if(!res)
{
mStartButton.setEnabled(false);
showAlert("שגיאה","אנא הגדר מחדש עיר מפעל ונקודת דיגום", false);
}
}
});
builder.show();
}
}

Edit: Inside the SelectPlace method , there is some code run on the UI thread itself like so:

private boolean selectPlace(Place place){
GetFactories factoryMethod = new GetFactories(mApp, selectedCity);
factoryMethod.call(); //This calls the WS and awaits results

final ArrayList factories =factoryMethod.getFactories();
Factory selectedFactory = null;
for(int i = 0; i < factories.size(); i++)
{
///Some logic
}

//Some more logic...
}

Address

Lahore
54000

Alerts

Be the first to know and let us send you an email when Android developers posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Android developers:

Share