Ich versuche eine Seite zu erreichen, wie in der link gezeigt. Kann mir bitte jemand helfen wie ich es bekomme.Android zusammenklappbar Aktionsleiste mit wischbaren Tabs
Antwort
https://github.com/kaedea/Andriod-Seamless-ViewPager-Header
Geworben I Dieses Beispiel seine feine Arbeit für me.please versuchen diese sicher u got ll.
Try this one
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/tabanim_maincontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<android.support.design.widget.AppBarLayout
android:id="@+id/tabanim_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">
<!-- View that will be hidden when video goes fullscreen -->
<RelativeLayout
android:id="@+id/nonVideoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white">
// your view
</RelativeLayout>
</RelativeLayout>
/***
Here You can add custom layout
**/
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:tabIndicatorColor="@android:color/holo_blue_light"
app:tabSelectedTextColor="@color/black"
app:tabTextColor="@color/black" />
</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>
</android.support.v4.widget.SwipeRefreshLayout>
Zum Auf- und Zuklappen Symbolleiste (keine Rolle spielt, wenn es Tabs oder nicht hat):
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CoordinatorLayout>
diese XML-Versuchen: und in Pager Ansicht können Sie klauen wie pro Registerkarte tablayout Auswahl erhalten .
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_addProfile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="@dimen/_5sdp"
app:backgroundTint="@color/colorPrimary"
app:elevation="@dimen/_2sdp"
app:fabSize="normal"
android:visibility="gone"
app:rippleColor="@color/textPrimary"
app:srcCompat="@drawable/ic_vector_plus_white"
app:useCompatPadding="true" />
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
app:layout_scrollFlags="scroll|snap"
app:titleEnabled="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_collapseMode="parallax">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/dv_coverImage"
android:layout_width="match_parent"
android:layout_height="@dimen/_100sdp"
android:scaleType="centerCrop"
android:alpha="0.85"
android:tint="@color/black_translucent"
android:src="@drawable/bg_profile" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_50sdp"
android:weightSum="1">
<ImageView
android:id="@+id/dv_profile_pic"
android:layout_width="@dimen/_80sdp"
android:layout_height="@dimen/_80sdp"
android:layout_margin="@dimen/_10sdp" />
</FrameLayout>
</FrameLayout>
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax"
app:navigationIcon="@drawable/ic_menu_white"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CollapsingToolbarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
android:background="?attr/selectableItemBackground"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_collapseMode="pin"
app:tabGravity="fill"
app:tabIndicatorColor="@color/white"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/white"
app:tabTextAppearance="@style/AppTheme.ProfileTab"
app:tabTextColor="@color/darkGreen" />
</LinearLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
<include layout="@layout/view_progress_view" />
</FrameLayout>
können Sie bitte im Detail über "view_progress_view" erzählen? –
Das ist eine Fortschrittsanzeige, die ich für meinen persönlichen Gebrauch erstellt habe. Sie können das ignorieren. Das Entfernen dieser Zeile wirkt sich nicht auf anderen Code aus –
Versuchen Sie, diese Bibliothek, Seamless viewpager https://github.com/kaedea/Andriod-Seamless-ViewPager-Header
- 1. Android: Swipey Tabs ohne Aktionsleiste
- 2. Android Aktionsleiste mit Menü Tabs verschmelzen
- 3. Aktionsleiste Tabs nicht füllen Bildschirm in Android
- 4. Android Studio- Tabs- Wechsel von Swipe-Ansichten zu Aktionsleiste Tabs
- 5. MapFragment in der Aktionsleiste Tabs
- 6. Robotium - Klicken auf Aktionsleiste Tabs
- 7. Aktionsleiste unterhalb seiner tabs wobei
- 8. Android Aktionsleiste Tabs, Styling das Symbol und Text zusammen
- 9. Android-Suchfunktion mit Aktionsleiste
- 10. Android - zusammenklappbar LinearLayout mit mehreren Elementen
- 11. Aktionsleiste Tabs ohne Verwendung von Fragmenten?
- 12. Android: ActionBar ausblenden, Tabs beibehalten
- 13. Android-Aktionsleiste: App-Symbol & Titel
- 14. ausblenden Aktionsleiste während Split-Aktionsleiste
- 15. Nativescript android entfernen Aktionsleiste
- 16. Ausblenden Aktionsleiste in Android
- 17. Android: Sherlock Aktionsleiste Dropdown
- 18. Android ActionBar: Tabs dynamisch ein-/ausblenden?
- 19. zusammenklappbar Symbolleiste Kollabieren
- 20. Aktionsleiste App-Symbol fehlt mit Android 5
- 21. Android ActionBar Sherlock mit Tabs
- 22. Anwendungssymbol wird nicht in Android-Aktionsleiste angezeigt
- 23. ActionBar Tabs Polsterung in Android entfernen
- 24. Wie man einen zunderartigen wischbaren Kartenstapel erstellt
- 25. Tabs oben Aktionsleiste beim Aufblasen des benutzerdefinierten Layouts
- 26. Platzieren/Überlappen (Z-Index) Eine Ansicht über Aktionsleiste Tabs
- 27. Kontextale Aktionsleiste mit DialogFragment
- 28. Android Aktionsleiste Farbe und Menü
- 29. Aktionsleiste Suchansicht (Android) Null Fehler
- 30. Android - Ändern der Position der Android-Aktionsleiste
ich denke, ohne zusammenklappbar Symbolleiste kann es nicht erweitern und ausblenden Symbolleiste – Rahul