Somebody? Any updates?

On Tue, Dec 1, 2009 at 9:01 AM, EvgenyV <evgen...@gmail.com> wrote:

> Hi!
>
> I got infinit loop when trying to run tab activity which creating
> dialog.
> Before I'm pressing the dialog button OK or Cancel button the system
> is
> starting my tab main activity again.
> It worked fine in all previouse versions.
>  The log report:
> *11-28 16:59:38.607: WARN/UsageStats(59): Something wrong here,
> didn't
> expect evgeny.converter to be resumed
> 11-28 17:12:06.498: ERROR/WindowManager(269):
> android.view.WindowLeaked:
> Activity evgeny.converter.TabMain has leaked window
> com.android.internal.policy.impl.phonewindow$decorv...@43cfd4f0 that
> was
> originally added here
> *
>
> Thanks in advance,
> Evgeny
>
>
> The code is as following:
> Launcher code:
>  SharedPreferences _State;
>     @Override
>     protected void onCreate(Bundle savedInstanceState) {
>
>
>      super.onCreate(savedInstanceState);
>
>
>         final TabHost tabHost = getTabHost();
>
>
>         tabHost.addTab(tabHost.newTabSpec("tabMeasures")
>                 .setIndicator(res.getString
> (R.string.tab_measures_title),
>                 res.getDrawable(R.drawable.measures_tab_32))
>                 .setContent(new Intent(this, MeasuresMain.class)));
>
>
>         tabHost.addTab(tabHost.newTabSpec("tabClothes")
>                 .setIndicator(res.getString
> (R.string.tab_clothes_title),
>                 res.getDrawable(R.drawable.clothes_tab_40))
>                 .setContent(new Intent(this, ClothesMain.class)));
>         tabHost.addTab(tabHost.newTabSpec("tabSettings")
>                 .setIndicator(res.getString
> (R.string.tab_settings_title),
>                 res.getDrawable(R.drawable.settings_tab_40))
>                 .setContent(new Intent(this,
> ConverterViewSettings.class)));
>
>
>         tabHost.setBackgroundResource(R.drawable.background_main);
>
>
>         _State = getSharedPreferences("Settings", MODE_WORLD_READABLE
> |
> MODE_WORLD_WRITEABLE );
>         if(_State.getBoolean
> (ConverterUtil.EVG_IS_SHOW_LICENSE_AGREEMENT,
> true))
>          showDialog(1);
>
>
>     }
>
>
> @Override
>     protected Dialog onCreateDialog(int id)
>     {
>      AlertDialog.Builder builder = new AlertDialog.Builder(this);
>      builder.setPositiveButton(R.string.lblButtonAgree, new
> DialogInterface.OnClickListener()
>      {
>       public void onClick(DialogInterface dialog, int whichButton)
>       {
>              try
>              {
>               SharedPreferences.Editor editor = _State.edit();
>
>
> editor.putBoolean(ConverterUtil.EVG_IS_SHOW_LICENSE_AGREEMENT,
> false);
>               editor.commit();
>              }
>              catch (Exception e)
>              {
>         e.printStackTrace();
>        }
>       }
>      });
>      builder.setNegativeButton(R.string.lblButtonExit, new
> DialogInterface.OnClickListener()
>      {
>       public void onClick(DialogInterface dialog, int whichButton)
>       {
>        finish();
>       }
>      });
>
>
>      LayoutInflater inflater = LayoutInflater.from(this);
>            builder.setTitle(R.string.lblLicenseCaption);
>            builder.setIcon(R.drawable.my_converter_32);
>      ScrollView layout = (ScrollView) inflater.inflate
> (R.layout.about,
> null);
>
>
>  ((TextView)layout.findViewById(R.id.txtAbout)).setText
> (R.string.lblLicenseT­ext);
>
>
>  ((TextView)layout.findViewById(R.id.txtMyEmail)).setVisibility
> (LinearLayout­.GONE);
>      builder.setView(layout);
>      return builder.create();
>     }
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to