Scorrere la vista all'interno di un frammento con tablayout e visualizzare pager non scorrimento

So che questa domanda è stata data molte volte, ma ho guardato quasi tutto, ma la mia visione di scorrimento all'interno di un frammento non è affatto scorrimento. Ho provato molte soluzioni ma nessuno di loro lavora. Per favore aiuto. Grazie. Ecco i miei file xml: file xml principale:

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_flame_photometry" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.india.chemistry.flame_photometry"> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabMode="fixed" app:tabGravity="fill"/> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </android.support.design.widget.CoordinatorLayout> </RelativeLayout> 

File di frammento che contiene la visualizzazione di scorrimento:

  • Come aggiungere librerie Android Support v7 in eclipse?
  • android - Come modificare il colore di background del grafico utilizzando achartengine
  • INSUFFICENT_STORAGE_MEMORY durante l'installazione di 50 mb ap in emulatore
  • Scorrere su una grande canvas
  • Imansible utilizzare entrambe le telecamere di Evo 4G usando OpenCV4Android
  • Decryption di crittografia RSA in Android
  •  <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true" tools:context="com.example.india.chemistry.flame_formula"> <!-- TODO: Update blank fragment layout --> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:isScrollContainer="false"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/flameHeader" android:text="@string/flameHheader" android:textAppearance="@style/TextAppearance.AppCompat" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/flameHeader" android:layout_marginTop="34dp" android:id="@+id/nacl_100cm" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:text="@string/nacl_100cm" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="5" android:layout_below="@+id/nacl_100cm" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginTop="10dp" android:id="@+id/nacl_100_input" android:inputType="numberSigned|numberDecimal" android:hint="(W)g" /> <TextView android:text="@string/nacl_1cm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/nacl_100_input" android:layout_marginTop="10dp" android:id="@+id/nacl_1cm" android:padding="5dp" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="textPersonName|numberSigned|numberDecimal" android:text="" android:layout_below="@+id/nacl_100_input" android:layout_toRightOf="@id/nacl_1cm" android:padding="5dp" android:id="@+id/nacl_1cm_result" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:layout_alignBottom="@+id/nacl_1cm" /> <TextView android:text="@string/mol_weights_nacl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/nacl_1cm" android:layout_marginTop="10dp" android:id="@+id/mol_weights_nacl" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" /> <TextView android:text="@string/mol_weights_kcl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/mol_weights_nacl" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginTop="10dp" android:id="@+id/mol_weights_kcl" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" /> <TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/mol_weights_kcl" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginTop="25dp" > <TableRow > <TextView android:id="@+id/srno_header" android:padding="5dp" android:text="Sl.\nno" /> <TextView android:id="@+id/nacl_volume" android:padding="5dp" android:text="@string/nacl_volume" /> <TextView android:id="@+id/weight_sodium" android:padding="5dp" android:text="Sodium \nweight" /> <TextView android:id="@+id/flame_reading_1" android:padding="5dp" android:text="@string/flame_reading" /> <TextView android:id="@+id/weight_sodium_2" android:padding="5dp" android:text="Sodium\nweight"/> <TextView android:id="@+id/flame_reading_2" android:padding="5dp" android:text="@string/flame_reading"/> </TableRow> <TableRow> <TextView android:id="@+id/slno1" android:padding="5dp" android:text="1" /> <TextView android:id="@+id/volume1" android:padding="5dp" android:text="@string/volume1"/> </TableRow> <TableRow> <TextView android:id="@+id/slno2" android:padding="5dp" android:text="1" /> <TextView android:id="@+id/volume2" android:padding="5dp" android:text="@string/volume2"/> </TableRow> <TableRow> <TextView android:id="@+id/slno3" android:padding="5dp" android:text="1" /> <TextView android:id="@+id/volume3" android:padding="5dp" android:text="@string/volume3"/> </TableRow> <TableRow> <TextView android:id="@+id/slno4" android:padding="5dp" android:text="1" /> <TextView android:id="@+id/volume4" android:padding="5dp" android:text="@string/volume4"/> </TableRow> <TableRow> <TextView android:id="@+id/slno5" android:padding="5dp" android:text="1" /> <TextView android:id="@+id/volume5" android:padding="5dp" android:text="@string/volume5"/> </TableRow> </TableLayout> </RelativeLayout> </ScrollView> 

  • Fai app per Android ascoltare i collegamenti condivisi
  • portndo libcurl su android con supporto ssl
  • Come get il numero di righe di una query in Android utilizzando SQLite?
  • Come simulare la perdita totale della networking in Emulator Android
  • Android billing v3 - nessuna firma
  • Ottenere RawContact id utilizzando Contact id
  • One Solution collect form web for “Scorrere la vista all'interno di un frammento con tablayout e visualizzare pager non scorrimento”

    Questa opzione funziona per me.

    Layout attività

     <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white"> <android.support.design.widget.AppBarLayout android:id="@+id/main.appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar></android.support.v7.widget.Toolbar> /*this toolbar not apply*/ </android.support.design.widget.AppBarLayout> <ViewPager android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> </ViewPager> </android.support.design.widget.CoordinatorLayout> 

    Layout di frammento

     <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" 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"> /**other elements here**/ </LinearLayout> </android.support.v4.widget.NestedScrollView> 
    L'Android è un fan Android di Google, tutto su telefoni Android, Android Wear, Android Dev e applicazioni Android Games e così via.