我正在尝试将admob
广告放在我的顶部,app
但普通文本需要保持在中间的中心......下面的代码只显示了一个组件..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/test.testpkg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:gravity="center"
android:background="@drawable/background"
android:padding = "10dip" >
<com.admob.android.ads.AdView
android:id="@+id/ad"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
myapp:backgroundColor="#000000"
myapp:primaryTextColor="#FFFFFF"
myapp:secondaryTextColor="#CCCCCC" />
<test.testpkg.CustomTextView android:id="@+id/landscapeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor = "#000"
android:textSize="40sp"
android:shadowColor="#FFF"
android:shadowDx="1.2"
android:shadowDy="1.2"
android:shadowRadius="1.2"
android:gravity="center_vertical"
android:text ="Test" />
</LinearLayout>