First thing is to actually use one of the correct constants in
View.setVisibility() -- such as View.VISIBLE.

On Sat, Apr 30, 2011 at 11:35 AM, Alaeddine Ghribi <
[email protected]> wrote:

> I've made this:
> public void onRegistrationDone(String localProfileUri, long
> expiryTime) {
>                        updateStatus("Registered to server.");
>                        Log.d("SUCCEED","Registration DONE");
>
>                         ImageView iconView = (ImageView)
> findViewById(R.id.connected);
>                        iconView.setVisibility(1);
>
>                    }
> But the image diesn't shows!
> Here is also my XML file:
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
> android:orientation="vertical" android:layout_width="fill_parent"
>        android:layout_height="fill_parent">
>
> <TextView xmlns:android="http://schemas.android.com/apk/res/android";
>  android:id="@+id/sipLabel"
>  android:layout_width="fill_parent"
>  android:layout_height="fill_parent"
>  />
>  <ImageView android:id="@+id/connected" android:src="@drawable/
> connected" android:layout_below="@id/sipLabel"
>  android:layout_width="wrap_content"
>                android:layout_height="wrap_content"
> android:layout_weight="0.35"
> android:gravity="center"
>                android:visibility="invisible" />
>                </LinearLayout>
>
> What could be the problem?
> Thank you very much.
>
>
> On 30 avr, 16:14, Dianne Hackborn <[email protected]> wrote:
> > setContentView() completely replaces your current UI with a new one.  If
> you
> > just want to make an image shown, you need to modify the current UI --
> for
> > example have an ImageView containing the image which you change between
> > View.INVISIBLE and View.VISIBLE.
> >  On Apr 30, 2011 10:48 AM, "Alaeddine Ghribi" <[email protected]
> >
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello,
> > > I want to change the UI(if possible just add an image to the UI) when
> > > i'm well connected to the server(i'm developping a SIP application) by
> > > adding an imaged "Connected" .
> > > In fact, i've made this but i have a FC:
> > > public void onRegistrationDone(String localProfileUri, long
> > > expiryTime) {
> > > updateStatus("Registered to server.");
> > > Log.d("SUCCEED","Registration DONE");
> > > setContentView(R.layout.connected);
> > > }
> >
> > > connected is an XMl file that has a textview(with same id as the
> > > main.xml) and the image that i want to add.
> > > How can i do this?
> >
> > > Thank you very much.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to