2016-03-26 18 views
4

私はアンドロイドではかなり新しいアプリですが、私はアプリを開発していますが、私は狂ったようにドライブしています。ことは、それが完全にスクロールしないことです、それはそれが見えないように画面からボタンを残します。ここでScrollviewが断片、アンドロイドで完全にスクロールしない

はXMLコードです:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="#d3d3d3" 
android:orientation="vertical"> 

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fillViewport="true" 
    > 

     <LinearLayout 
      android:orientation="vertical" 
      android:background="@drawable/bg_sugerir" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="10dp" 
      android:layout_marginLeft="10dp" 
      android:layout_marginRight="10dp" 
      android:id="@+id/linearLayout" 
      > 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:id="@+id/imageView" 
       android:src="@drawable/pd" 
       android:layout_marginBottom="15dp" 
       /> 

      <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/editText" 
       android:layout_marginBottom="15dp" 
       android:hint="Nombre" /> 

      <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:inputType="phone" 
       android:ems="10" 
       android:id="@+id/editText2" 
       android:layout_marginBottom="15dp" 
       android:hint="Teléfono" /> 

      <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/editText4" 
       android:layout_marginBottom="15dp" 
       android:hint="Provincia" /> 

      <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/editText3" 
       android:layout_marginBottom="15dp" 
       android:hint="Descripción" /> 

      <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="Enviar" 
       android:id="@+id/button" /> 


     </LinearLayout> 
</ScrollView> 
</LinearLayout> 

それは次のことを示しているが、示されているように、ボタンがありません。 notScrolling

誰も私を助けることができる希望、感謝

答えて

3

てみてくださいScrollViewandroid.support.v4.widget.NestedScrollViewに置き換えます。

+1

私のために動作しません:( –

0

ScrollViewに変更します。 LinearLayoutを使用するかわりにandroid.support.v4.widget.NestedScrollViewを使用してください。

+0

は私のために働いていない... –

+0

私はあなたの特定の実装の詳細と新しい質問をする持っていると信じています。 – Mauker

0

私は解決策を得ました。コンテナを置き換えます(Relativelayoutからscrollviewまで)。

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/container" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.exampl.nitish.complteproject.MainActivity"> 
    enter code here 

</ScrollView> 
関連する問題