2011-08-30 5 views

답변

0

귀하의 안드로이드 매니페스트에 activity 요소의 android:windowSoftInputMode 속성을 살펴보십시오. 내 응용 프로그램에서이 코드를 사용합니다 :

<activity android:name="MyActivity" 
      android:label="@string/app_name" 
      android:windowSoftInputMode="adjustResize" 
      android:configChanges="orientation|keyboardHidden" 
      android:launchMode="singleInstance" 
      android:screenOrientation="portrait"> 

줄을 android:windowSoftInputMode="adjustResize" 참고. 자세히 알아보기 : http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft

0

항상 화면 상단에 표시하려면 RelativeLayout을 사용하는 것이 좋습니다.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

<com.admob.android.ads.AdView 
     android:id="@+id/ad" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     app:backgroundColor="#000000" 
     app:primaryTextColor="#FFFFFF" 
     app:secondaryTextColor="#CCCCCC" 
     android:layout_alignParentTop="true" 
    /> 

<!-- TextView below that --> 

<TextView 
android:id="@+id/widget28" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="Input Amount:" 
android:layout_marginLeft="10dip" 
android:layout_marginTop="10dip" 
android:layout_marginRight="10dip" 
android:layout_below="@id/ad" 
android:textSize="16dip" 
android:textStyle="bold"> 
</TextView> 

</RelativeLayout> 
관련 문제