Can u put the error log here please so that i can know what the actual
error u get is...
Peace,
Prafull.
On Apr 1, 4:35 am, Sasi <[email protected]> wrote:
> Hi-
>
> I am trying to display the image on the ImageView object. But the
> setImageResource fails to display the image. If it succeeds, I would
> like to update image on ImageView object based on some criteria.
>
> Here is my XML layout file looks like:
>
> <?
> xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
> android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent">
> <FrameLayout
> android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:layout_weight="1">
> <ImageView
> id="@+id/batteryLevelview"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_gravity="center"/>
> </FrameLayout>
> </LinearLayout>
>
> Here is my code:
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> ImageView batteryLevelImage = (ImageView)
> findViewById(R.id.batteryLevelview);
> batteryLevelImage.setImageResource(R.drawable.notconnected);
>
> }
>
> I could not find what's wrong. I tried using the LinearLayout and that
> did not help. Please help me what's wrong.
>
> thanks,
--
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
To unsubscribe, reply using "remove me" as the subject.