Android : I Need To Arrange The Layout Of My Application
I made my first Android application using eclipse. Now I need to arrange the Layout because my layout now show the Google AdMob ads over the main content, over the WebView. Also, w
Solution 1:
You've put the AdView
within the RelativeLayout
, which will put it on top of the items in there.
You want to put it within the LinearLayout
only; I've shown you what you have to do if you want it between the ProgressBar
and RelativeLayout
:
<?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><ProgressBarandroid:id="@+id/web_view_progress_bar"style="?android:attr/progressBarStyleHorizontal"android:layout_width="fill_parent"android:layout_height="15dip"android:padding="2dip"android:progressDrawable="@drawable/colorprogress" /><com.google.ads.AdViewandroid:id="@+id/adView"android:layout_width="wrap_content"android:layout_height="wrap_content"ads:adUnitId="a1500108406597c"ads:adSize="BANNER"ads:loadAdsOnCreate="true"android:layout_alignParentBottom="true"/><RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><ImageViewandroid:id="@+id/splash_view"android:layout_width="match_parent"android:layout_height="match_parent"android:contentDescription="@string/desc"android:scaleType="fitXY"android:src="@drawable/splash"android:visibility="visible" /><WebViewandroid:id="@+id/web_view"android:layout_width="match_parent"android:layout_height="match_parent"android:scrollbars="none"android:visibility="gone" /></RelativeLayout></LinearLayout>
Of course, if you want it at the bottom instead, put it above the </LinearLayout>
tag.
Post a Comment for "Android : I Need To Arrange The Layout Of My Application"