android - RelativeLayout widgets width larger that RelativeLayout width -


i have relativelayout top bar of appwidget. contains 3 imageviews fixed witdh , 1 textview, depending on textview text or widget size relativelayout width can smaller sum of single widget, in case textview , imageview overlay 1 on other. avoid it, accettable solution hide textview if there no space.

how can it?

    <relativelayout             android:id="@+id/rl_top"             android:layout_width="match_parent"             android:layout_height="wrap_content">              <imageview                  android:id="@+id/iv_logo"                 android:layout_width="32dip"                 android:layout_height="32dip"                 android:layout_alignparentleft="true"                 android:layout_centervertical="true"                 android:src="@drawable/logo"                 android:contentdescription="@string/logo"  />               <textview                  android:id="@+id/tv_title"                 android:layout_height="wrap_content"                 android:layout_width="wrap_content"                 android:layout_centervertical="true"                 android:textsize="@dimen/text_title"                 android:layout_torightof="@+id/iv_logo" />              <imageview                  android:id="@+id/iv_new"                 android:layout_width="32dip"                 android:layout_height="32dip"                 android:layout_centervertical="true"                 android:layout_toleftof="@+id/iv_refresh"                 android:src="@drawable/neww"                 android:contentdescription="@string/neww"  />              <imageview                  android:id="@+id/iv_refresh"                 android:layout_width="32dip"                 android:layout_height="32dip"                 android:layout_centervertical="true"                 android:layout_alignparentright="true"                 android:src="@drawable/refresh"                 android:contentdescription="@string/refresh"  />          </relativelayout> 

set width of texvview fixed value , wrap_content height. hope fix it.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -