当前位置: 动力学知识库 > 问答 > 编程问答 >

how to set text on hidden imageview in android

问题描述:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/rl_main"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:background="#ffffff" >

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:weightSum="5" >

<RelativeLayout

android:id="@+id/relativelayout2"

android:layout_width="246dp"

android:layout_height="wrap_content"

android:paddingBottom="15dp"

android:layout_weight="3" >

<com.lociiapp.utils.RoundedImageView

android:id="@+id/notificationuserimage"

android:layout_width="46dp"

android:layout_height="46dp"

android:layout_alignParentLeft="true"

android:layout_marginBottom="17dp"

android:layout_marginLeft="17dp"

android:layout_marginRight="17dp"

android:layout_marginTop="17dp"

/>

<!-- <TextView -->

<!-- android:id="@+id/title" -->

<!-- android:layout_width="wrap_content" -->

<!-- android:layout_height="wrap_content" -->

<!-- android:layout_alignParentRight="true" -->

<!-- android:layout_marginTop="15dip" -->

<!-- android:layout_toEndOf="@+id/notificationuserimage" -->

<!-- android:fontFamily="calibri" -->

<!-- android:text="Request for traveling" -->

<!-- android:textColor="#888686" -->

<!-- android:textSize="14dip" /> -->

<TextView

android:id="@+id/desc"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="15dp"

android:layout_toRightOf="@+id/notificationuserimage"

android:fontFamily="calibri"

android:textColor="#888686"

android:text="Hello how are u"

android:textSize="15dp" />

<TextView

android:id="@+id/revresetime"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_below="@+id/desc"

android:layout_marginRight="32dp"

android:layout_marginTop="1dp"

android:layout_toRightOf="@+id/notificationuserimage"

android:text="time"

android:textColor="#c9cdd0"

android:textSize="12dp"

/>

</RelativeLayout>

<LinearLayout

android:id="@+id/linearlayout"

android:layout_width="wrap_content"

android:layout_height="match_parent"

android:layout_marginBottom="17dip"

android:layout_marginRight="5dip"

android:layout_marginTop="17dip" >

<ImageView

android:id="@+id/imageView1"

android:layout_width="32dp"

android:layout_height="32dp"

android:layout_marginTop="8dp"

android:paddingRight="10dp"

android:src="@drawable/rejecticon" />

<View

android:id="@+id/view1"

android:layout_width="1dp"

android:layout_height="50dp"

android:background="#e0e0e0" />

<ImageView

android:id="@+id/imageView2"

android:layout_width="32dp"

android:layout_height="32dp"

android:layout_marginTop="8dp"

android:paddingLeft="10dp"

android:src="@drawable/accepticon" />

</LinearLayout>

</LinearLayout>

</RelativeLayout>

This is my Xml in which there is imageview textview and then again there is textview i want when linearlayout hidden then text view text set to imageview i but its not coming please check where am doing wrong . please check my

分享给朋友:
您可能感兴趣的文章:
随机阅读: