views:

207

answers:

3

Hi experts, Please refer the image given in the url http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185M2RneG5nYmNm&hl=en

My query is, How can I display the messages corresponding to the rounded buttons and the table row , when I click on the rounded button with question mark.

I know, I have to use listener for the ? button , but what should I do in listener exactly, such that when I click, it shows those alerts(images) and when I click again, it disappears.

Please help.

Any help in this regard is well appreciated.

Regards, Rony

A: 

You can use a FrameLayout as the base for your ui layout and then add an ImageView overlay. For example:

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MainFrame"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <!-- Put your normal layout stuff here -->

</FrameLayout>

Then in your code you can create the ImageView and add it to the MainFrame and it will overlay your UI, like this:

FrameLayout mainFrame = (FrameLayout)findViewById(R.id.MainFrame);
ImageView overlay = new ImageView(this);
overlay.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.overlay));
mainFrame.addView(overlay);

Then later you can call:

mainFrame.removeView(overlay);

to have it go away.

CaseyB
A: 

For this UI, I have used Relative layout as was suggested here -- http://stackoverflow.com/questions/2544988/aligning-components-at-desired-positions -- and it worked perfect for me.

So, do I need to change my base layout altogether for accomplishing this?

Rony
A: 

Any help is appreciated.

Regards, Rony

Rony