[android-developers] NullPointerExeption during addTab to TabHost

2010-12-02 Thread Vladyslav Namashko
Hi all.

I have TabActivity, whose tabs are added during onCreateMethod.
Something like this:

tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec(main_tab1).setIndicator(...));
...

It works fine, but sometimes I get NullPointerExeption when trying to
add tab using addTab. This problems reproduced very rarely, so I can't
find, where I'm wrong.

Somewhere I've read, that setting first tab as current
(tabHost.setCurrentTab(0)) before adding tabs (using addTab) can fix
this problem, but no luck :(

So, many thanks for any help.

--
Regards

-- 
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


[android-developers] Mask password in landscape mode

2010-09-07 Thread Vladyslav Namashko
Hi all,

I've created custom ui component for pair label-editText. This
component has to have possibility to mask password in editText field:

InputItem extends LinearLayout {
   private TextView label;
   private EditText text;
...
   boolean isPassword =
array.getBoolean(R.styleable.InputItem_isPassword, false);
   if (isPassword) {
  text.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
  text.setTransformationMethod(new
PasswordTransformationMethod());
   }

It works fine in portrait mode, but in landscape mode letters, entered
in special popup form became visible (i.e. unmasked). It's possible
just to reject this popup frame appearence

text.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

but is it possible to mask password letters in this popup frame?

--
Regards

-- 
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


[android-developers] trackball selections on list view

2010-08-30 Thread Vladyslav Namashko
Hi all,

Using list view with simple ArrayAdapter it's possible to select list
items by trackball. What should I do to have the same possibility for
list view view with my custom adapter (my adapter extends
ArrayAdapter)?

Regards.

-- 
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