Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6060507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:50:01+00:00 2026-05-23T08:50:01+00:00

I have a RelativeLayout that contains a WebView and a ListView (ListViewContainer is a

  • 0

I have a RelativeLayout that contains a WebView and a ListView (ListViewContainer is a subclass of ListView:

public AdListViewContainer(Context context, ServiceLookup lookup, MarketList list, Registry registry, BitmapCache bitmapCache, Utilities utilities, ActionFlipper flipper) {
    super(context);

    mScale = getContext().getResources().getDisplayMetrics().density;
    final int orientation = getResources().getConfiguration().orientation;

    setClickable(true);
    if (orientation == Configuration.ORIENTATION_PORTRAIT) {
        mAd = new WebView(context);
        mAd.setId(1234);
        mAd.setWebViewClient(new AdListWebClient());
        mAd.setOnTouchListener(new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) {
                Log.d (TAG, "Inner Event " + event.getAction());
                return false;
            }
        });
        mAd.getSettings().setJavaScriptEnabled(true);

        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);

        lp.addRule(ALIGN_PARENT_BOTTOM, 1);
        addView(mAd, lp);
    }
    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
    if (mAd != null) {
        lp.addRule(ALIGN_BOTTOM, mAd.getId());
    }
    mListContainer = new ListViewContainer(context, lookup, list, registry, bitmapCache, utilities, flipper);
    addView(mListContainer, lp);
}

The WebView is showing an ad generated by Adition, basically an img-tag in an a-tag.

The problem I have is that the ad can’t be clicked. No touch or click events are received by the WebView. When I remove the ListView and the WebView is the only child of the ViewGroup (by removing the last addView call), the ad is clickable and everything is fine.

ListViewContainer is a straightforward subclass of ListView that contains a load of clickable LinearLayouts.

Any help appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:50:01+00:00Added an answer on May 23, 2026 at 8:50 am

    Ok, I found the issue. The ListView was overlapping the WebView, caused by using ALIGN_BOTTOM instead of ABOVE. D’Oh. HierarchyViewer was a blast in finding this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main menu screen with a simple ListView that contains links to
I have a layout defined in XML. It contains also: <RelativeLayout android:id=@+id/item android:layout_width=fill_parent android:layout_height=wrap_content
I' have a view that contains several textViews an ImageView and a Button .
I'm trying to make scrollable RelativeLayout, that contains some custom Views. This is the
in a RelativeLayout I have an Imageview that serves as the background of the
I have a an Android ListView that has small (say, 1-5 frame) stutters as
I have a relatively simple layout that contains an EditText . The activity itself
I have a RelativeLayout that I want to contain 4 concentric circles (a radar
I have listview that contain checkbox and an image when the checkbox is clikced
I have an Activity that consists of a large scrollview (that contains EditText fields)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.