After changing position labels of items are gone
- by unresolved_external
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 "".