开发者

process Dialog not Showing immediately in List View

开发者 https://www.devze.com 2023-04-01 23:01 出处:网络
Hi I am new in android and I am trying to put process Dialog on click event of list view, No doubt its working but I found that process Dialog shows very late, I need that, It should be show immediate

Hi I am new in android and I am trying to put process Dialog on click event of list view, No doubt its working but I found that process Dialog shows very late, I need that, It should be show immediately after I click, my peace of code is here. please give me appropriate solution for this. Thanks !

    lv1.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> a, View v,
                final int position, long id) {
            pd = ProgressDialog.show(v.getRootView().getContext(), "",
                    "Please Wait....", true, true);
            MyThreadNew myThread = new MyThreadNew(position);开发者_如何学JAVA
        //  myThread.setPriority(Thread.MIN_PRIORITY);
            myThread.start();
        }
    });


are you testing it in Emulator then it will be slow in reponse, so just check on device

0

精彩评论

暂无评论...
验证码 换一张
取 消