public void onClick( View v ) {
        switch ( v.getId ( ) )
        {
        case R.id.btn_Group_Save: // 아이템 그룹 저장하기
            
            mprogressDialog = ProgressDialog.show ( GoodGroupSettingActivity.this , "" , "잠시만 기다려 주세요 ..." , true );
            
            SparseBooleanArray selectedItems = listView.getCheckedItemPositions ( );
            Map param = new HashMap ( );
            GoodLargeGroupList goodgrouplist;
            Jbatis abatis = new Jbatis ( this );
            abatis.execute ( "deleteplugoodgroup" , param );
            for ( int i = 0 ; i < selectedItems.size ( ) ; i++ )
                {
                    if ( selectedItems.valueAt ( i ) )
                        {
                            param = new HashMap ( );
                            param.put ( "name" , listView.getAdapter ( ).getItem ( selectedItems.keyAt ( i ) ).toString ( ) );
                            goodgrouplist = ( GoodLargeGroupList ) abatis.executeForBean ( "selectgroupcode" , param ,
                                    GoodLargeGroupList.class );
                            param = new HashMap ( );
                            param.put ( "code" , goodgrouplist.getCode ( ).toString ( ) );
                            param.put ( "name" , listView.getAdapter ( ).getItem ( selectedItems.keyAt ( i ) ).toString ( ) );
                            abatis.execute ( "insertplugoodgroup" , param );
                        }
                }
            AlertView.showAlert ( "성공적으로 저장이 되었습니다." , GoodGroupSettingActivity.this );
            try
                {                    
                    Update_MasterItem upm = new Update_MasterItem ( );
                    upm.update_masteritem ( this ); // 저장후 서버에 접속해서 다시 다운로드 한다.
                    
                }
            
            catch ( Exception ex )
                {
                    AlertView.showAlert ( "DB다운로드에 실패했습니다" , GoodGroupSettingActivity.this );
                }
            break;
        }
        mprogressDialog.dismiss ( );
    }

 

보시다시피 btn_group_save 버튼을 누르면 DB의 쿼리문을 정리하는 부분으로 개발중입니다.

개발은 현재 다 끝났는데 서버에서 접속을 다운받는 과정에서 시간이 약간 소요되기에, Progressdialog 를 구현하려 합니다.

처음 case R.id.btn_Group_save 밑에서 progressdialog를 선언해주었으나, 어플을 막상 실행시켜보면 alertview의 "성공적~" 메시지와 함께 팝업이 되어버리네요.

그렇다고 dismiss를 추가하였더니 progressdialog가 팝업되자마자 dismiss가 되어버려서 실제로는 보이지도 않습니다.

(이는 디버깅으로 확인하였습니다.)

progressdialog를 어떤위치에 어떻게 삽입을 하여야 올바르게 잘 될지 모르겠습니다. 조언 부탁드립니다.

공지사항 다 읽었음