After changing position labels of items are gone

Posted by unresolved_external on Stack Overflow See other posts from Stack Overflow or by unresolved_external
Published on 2012-05-31T16:36:47Z Indexed on 2012/05/31 16:40 UTC
Read the original article Hit count: 215

Filed under:
|
|

I have FrameLayout, which has buttondeclared like this:

    <Button
        android:id="@+id/button_face_popup_more"
        android:layout_alignParentRight="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:text="@string/more"
        android:textColor="#1c1c1c"
        android:textSize="15dp"
        android:singleLine="true"
        android:ellipsize="end" />

When I add it to the ViewGroup in the first time, everything is great. But when I need to replace it according to screen size:

        if ( screenHeight < h + popupRect.top )
        {
        removeView(mPopupView);
        //((Button) mPopupView.findViewById(R.id.button_face_popup_more)).setText(R.string.more);
        addView(mPopupView, popupRect.left, screenHeight - h, popupRect.width());

        }

I got button with no label. What can be the issue? Almost forgot when I check in debug mText filed of that button in both cases, when it is displayeed and when it is not, it equals "".

© Stack Overflow or respective owner

Related posts about android

Related posts about button