2010-11-25 4 views
3

텍스트보기와 메뉴가 있습니다. 텍스트보기는 현재 화면 하단에 표시되어 있으며 메뉴를 누르면 현재 메뉴가 텍스트보기를 숨기지 만 텍스트보기가 자동으로 upwords로 이동하여 모두가 할 수있게합니다.Android textview 및 메뉴

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" android:orientation="vertical" 
    android:background="@drawable/android_bg" 
    android:layout_height="fill_parent"> 

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
     android:layout_height="50dp" 
     android:background="@drawable/navigationbar"> 
     <TextView android:layout_width="wrap_content" android:layout_centerInParent="true" 
     android:id="@+id/banner_text" 
      android:layout_height="wrap_content" android:background="@drawable/bannertext_angies_list">></TextView> 

      <Button 
      android:layout_width="55dp" 
      android:layout_alignParentRight="true" 
      android:layout_centerVertical="true" 
      android:layout_marginRight="5dp" 
      android:layout_height="35dp" 
      android:background="@drawable/sign_out_button_clicked_button" 

       android:id="@+id/signout"/> 

    </RelativeLayout> 
    <ScrollView 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 
      <LinearLayout android:layout_width="fill_parent" 
      android:orientation="vertical" 
      android:layout_height="fill_parent"> 
    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     > 






    <TableLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="20dp"> 
     <TableRow 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginTop="10dp"> 

      <TextView 
       android:visibility="gone" 
       android:textColor="#000000" 
       android:text="Thank you, your report has been" 
       android:textSize="16sp" 
       android:textStyle="bold" 
       android:layout_width="260dp" 
       android:layout_height="fill_parent" 
       android:id="@+id/Thanks_to_submission1"/> 
       </TableRow> 
       <TableRow 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 

      > 
       <TextView 
       android:visibility="gone" 
       android:paddingLeft="70dp" 
       android:textColor="#000000" 
       android:text="submitted successfuly!" 
       android:textSize="16sp" 
       android:textStyle="bold" 
       android:layout_width="260dp" 
       android:layout_height="fill_parent" 
       android:id="@+id/Thanks_to_submission2"/> 
     </TableRow> 


     <TableRow 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginTop="50dp"> 

      <Button 
       android:layout_width="260dp" 
       android:layout_height="fill_parent" 
       android:background="@drawable/submitbutton" 
       android:id="@+id/submitreport_providertype_button"/> 
     </TableRow> 

     <TableRow 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginTop="10dp"> 

      <Button 
       android:layout_width="260dp" 
       android:layout_height="fill_parent" 
       android:background="@drawable/searchlist_button" 
       android:id="@+id/search_list_button"/> 

     </TableRow> 

     <TableRow 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginTop="10dp"> 

      <Button 
       android:layout_width="260dp" 
       android:layout_height="fill_parent" 
       android:background="@drawable/bigdeal_button" 
       android:id="@+id/big_deal_button"/> 

     </TableRow> 


</TableLayout> 


     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="center_horizontal" 
      android:layout_marginTop="50dp"> 

      <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 

      android:layout_gravity="center" 
      android:textSize="14sp" 
      android:textStyle="bold" 
      android:onClick="true" 
      android:textColor="#000000" 
      android:text="Or visit our website at" /> 

      <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="40dp" 
      android:id="@+id/link" 
      android:gravity="center_vertical" 
      android:autoLink="web" 
      android:linksClickable="true" 
      android:layout_gravity="center" 
      android:textSize="14sp" 
      android:textStyle="bold" 

      android:onClick="true" 
      android:textColor="#000000" 
      android:text="@string/link" /> 


     </LinearLayout> 

     <TextView 
      android:visibility="invisible" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_marginLeft="14dp" 
      android:text="Or visit our website at" /> 


</LinearLayout> 
</LinearLayout> 
    </ScrollView> 
</LinearLayout> 
+0

Android에서 실제로 지원되는 것은 아니며 의도적으로 설계된 것입니다. 아이디어는 UI를위한 전체 화면을 사용할 수 있으며 메뉴는 선택해야 할 때 공간의 일부를 차지합니다. 메뉴가 올라간 동안 텍스트보기 및 기타 사항에 대해 걱정하지 않으려 고합니다. 이것은 메뉴 항목의 화면 공간을 영구히 포기해야하는 iPhone보다 낫습니다. 무언가가 정말로 중요한 경우 화면 아래쪽에서 멀리 옮깁니다. – EboMike

+0

답변도 있습니다. 기다려. – EboMike

답변

0

Android에서 실제로 지원되는 것은 아니며 의도적으로 설계된 것입니다. 아이디어는 UI를위한 전체 화면을 사용할 수 있으며 메뉴는 선택해야 할 때 공간의 일부를 차지합니다. 메뉴가 올라간 동안 텍스트보기 및 기타 사항에 대해 걱정하지 않으려 고합니다. 이것은 메뉴 항목의 화면 공간을 영구히 포기해야하는 iPhone보다 낫습니다. 무언가가 정말로 중요한 경우 화면 아래쪽에서 멀리 옮깁니다.

실제로 물건을 움직일 때 구부리지 만 않으면 Activity.onPrepareOptionsMenu을 가로 채고 UI에서 물건을 움직일 수 있습니다.하지만 그 기능은 실제로 그 목적을위한 것이 아닙니다. 일치하는 통화는 onOptionsMenuClosed입니다.