N
N
Natapr02015-09-02 18:07:54
HTML
Natapr0, 2015-09-02 18:07:54

How to programmatically create android tabs so that they are located below the ActionBar?

prntscr.com/8bs49h
I want to create tabs in such a way that they are inside the ActionBar element, it only turns out to be lower, but then the line with a shadow separating the ActionBar from the main content appears between the TabHost and the ActionBar.
How can this be done programmatically?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valentin, 2019-03-22
@aidar_sh

Might work, give it a try

RewriteEngine On
RewriteRule ^/medicinskie-[shapochki|kolpaki]/(.*)$ https://medicrashodka.ru/golovnie-ubori/$1 [R=301,L]

E
Emin, 2015-09-02
@Ewintory

I do so without any dividing shadow

<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    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.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        <android.support.design.widget.AppBarLayout
            android:id="@+id/app_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                app:layout_scrollFlags="scroll|enterAlways" />

            <android.support.design.widget.TabLayout
                android:id="@+id/tab_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?attr/colorPrimary"
                app:tabContentStart="@dimen/keyline_1"
                app:tabIndicatorColor="@android:color/white"
                app:tabMode="scrollable"
                app:tabSelectedTextColor="@color/body_text_1_inverse"
                app:tabTextColor="@color/body_text_2_inverse" />

        </android.support.design.widget.AppBarLayout>

        <!--suppress AndroidElementNotAllowed -->
        <include
            layout="@layout/partial_fab_shopping_cart"
            app:layout_anchor="@id/pager" />

    </android.support.design.widget.CoordinatorLayout>

    <include layout="@layout/navdrawer" />

</android.support.v4.widget.DrawerLayout>

O
Oleg Gamega, 2015-09-02
@gadfi

this is an example of an old design, and how you want it turns out in landscape orientation habrahabr.ru/post/189678

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question