English 中文(简体)
Admob to Listview: Anders Layout
原标题:Admob to Listview: Android Layout

我再一次需要一些帮助。 审判和错误效果不佳。 谁能看我的法典? 我希望我的发言能够包含上页顶端的同声,今天上午,我正在挣扎。 提前感谢!

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="5dp"
     >

   <com.google.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            ads:adSize="BANNER"
            ads:adUnitId="xxxxxxxxxxxxxxx"
            ads:loadAdOnCreate="true"
            android:layout_alignParentTop="true" />

    <TextView
        android:id="@+id/txtPlaceName"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:ellipsize="end"
        android:singleLine="true"
        android:text="saa"
        android:textSize="25sp"
        android:layout_below="@id/adView" />

    <LinearLayout
        android:id="@+id/layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/imgType"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/marker1" />

        <LinearLayout

            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >

            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal" >

                <TextView
                    android:id="@+id/txtCityState"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="city, st"
                    android:textSize="15sp" />

                <TextView
                    android:id="@+id/txtDistance"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:textSize="15sp" />
            </RelativeLayout>

            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal" >

                <RatingBar
                    android:id="@+id/average_ratingbar"
                    style="?android:attr/ratingBarStyleSmall"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:numStars="5"
                    android:stepSize="1.0" />

                <TextView
                    android:id="@+id/txtCommentsCount"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:textSize="15sp" />
            </RelativeLayout>
        </LinearLayout>
    </LinearLayout>



</LinearLayout>
最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 简短回答

Banner ad需要320dp宽。 页: 1

www.un.org/Depts/DGACM/index_spanish.htm 未来

安德森有一个名为“LogCat,用于跟踪所有贴上标签的信息。 AdMob SDK提供伐木信息,在解决这些问题时,这些信息非常有用。 这就是我如何解决你的问题。

你可以通过遵循上述链接的指示来看待LogCat的输出,或者你可以查看Eclipse的LogCat输出,到。 Window -> show View ->logCat 。 SDK在要求一名被告时,把以下信息贴上了标签:

Not enough space to show the ad!  Wants: <320,50>, Has: <310,473>

从那以后,我很容易告诉你,只有320名女巫,并且确保你高层的布局足够,每个方面有5次女婴。

www.un.org/Depts/DGACM/index_spanish.htm Unrelated Layout Tip

Fyi, The android:layout_alignParentTop and android:layout_below characteristics only do any within the RelativeLayout. 在以上所述内容中,《意见》和《意见》中的这些属性没有任何意义。

问题回答

暂无回答




相关问题
Android floating view (over other views)

I ve been messing around with this for a few days now, hopefully someone here can lend me a hand. I have a simple two-column layout, the left side is a navigation bar with buttons, the right side is ...

How to layout text to flow around an image

Can you please tell me if there is a way to layout text around an image? Like this: ------ text text text | | text text text ----- text text text text text text text text text text text I ...

Android 2.1 bug: uses res/layout-v3 instead of res/layout

In addition to the general res/layout folder I have a res/layout-v3 folder for backward compatibility with Android 1.5, which has problems with some RelativeLayout layouts. It works perfectly with ...

ListView and LineraLayout under one ScrollBar

I want to create the following layout: Section 1 is a LinearLayout which contains an ImageView and a TextView Section 2 is a ListView with customized row layouts. I want to place both components ...

How do I remove lines between ListViews on Android?

I m using two ListViews like this: <ListView android:id="@+id/ListView" android:text="@string/Website" android:layout_height="30px" android:layout_width="150px" android:scrollbars="...

Android: LinearLayout addView Animation

I currently have a working Android program that programmatically adds views to a LinearLayout. I would like those views to be animated in and cannot find any good resources on figuring out how to do ...

How to specify id when uses include in layout xml file

In my layout xml file, I have included other layout xml file (each with a different android id). <include layout="@layout/view_contact_name" android:id="+id/test1"/> <include layout="@layout/...