Layout Issue During Ad Load
I have a problem setting up layout. Before AD is loaded it looks like this: After AD is loaded, everything goes to it's place. It looks like this ( correct ) Does anybody know ho
Solution 1:
Change your top level Relative Layout to a linear Layout (vertical) and then use layout_weight on the three layouts. set the layout_weight for mytouchview to 1 and the other two to 0. This will give mytouchview all the extra space and push the buttons and ad to the bottom. When the ad takes up space it will push the button tray up appropriately, but it won't take any space if the ad never loaded.
Solution 2:
Try that one:
<?xml version="1.0" encoding="utf-8"?><RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"xmlns:app="http://schemas.android.com/apk/res/example.com"><LinearLayoutandroid:layout_height="match_parent"android:layout_width="match_parent"android:layout_above="@+id/myAdView"android:orientation="vertical" ><com.example.touch.TouchImageViewandroid:id="@+id/mytouchview"android:layout_height="match_parent"android:layout_width="match_parent"android:layout_marginLeft="5dp"android:layout_marginRight="5dp"android:layout_marginTop="5dp"
/><RelativeLayoutandroid:id="@id/+relat"android:layout_width="match_parent"android:layout_height="wrap_content"android:paddingLeft="10dp"android:paddingRight="10dp"
><ImageButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:padding="3dp"android:layout_alignParentLeft="true"android:background="@null"android:src="@drawable/previous"android:id="@+id/previous"/><TextViewandroid:layout_height="wrap_content"android:layout_width="wrap_content"android:textSize="20sp"android:text="2/15"android:id="@+id/memeNumber"android:layout_centerInParent="true"android:layout_margin="5dp"/><ImageButtonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:padding="3dp"android:layout_alignParentRight="true"android:background="@null"android:src="@drawable/next"android:id="@+id/next"/></RelativeLayout></LinearLayout><com.csjy.sfwn148282.AdViewxmlns:ap="http://schemas.android.com/apk/res-auto"android:id="@id/myAdView"android:layout_width="wrap_content"android:layout_height="wrap_content"ap:animation="fade"ap:placementType="interstitial"ap:banner_type="inappad"ap:test_mode="true"ap:canShowMR="false"android:layout_alignParentBottom="true"
/></RelativeLayout>
Post a Comment for "Layout Issue During Ad Load"