0
我有一個佈局ScrollView
,LinearLayout
(用於小屏幕設備)但是當我把我的AD
我沒有看到它在我的屏幕。並在layout
(來自Android Studio),我沒有在設備屏幕上看到我的AD
。如何確定一個元素底部
你能幫我解決嗎?
謝謝:)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<!-- Login progress -->
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/email_login_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="1dp"
android:hint="@string/connect_id"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/connectbutton"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/connect_button"
android:textStyle="bold" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:text="@string/connect_tutorial_id_title"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/connect_tutorial_id_content" />
</LinearLayout>
</ScrollView>
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adViewLandingPage"
android:layout_width="match_parent"
android:layout_height="39dp"
android:layout_gravity="bottom"
android:gravity="bottom"
ads:adSize="BANNER"
ads:adUnitId="@string/pub_connect" />
</LinearLayout>
我不認爲這是我的Java代碼:
mAdView = (AdView) findViewById(R.id.adViewLandingPage);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("XX")
.build();
mAdView.loadAd(adRequest);
感謝的:)但是,什麼是'機器人:layout_height =「0」'因爲我對0 – PotatoesPower
的錯誤嘗試,因爲1(不是「 1「),沒有引號。 –
我有一個'XML'錯誤,因爲我沒有寫''「' – PotatoesPower