Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawerList Issue #8

Open
GauravCreed opened this issue Sep 29, 2016 · 0 comments
Open

DrawerList Issue #8

GauravCreed opened this issue Sep 29, 2016 · 0 comments

Comments

@GauravCreed
Copy link

Hi @ppamorim

I am trying to fill list in DrawerLayout like
`

<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_left"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <com.ogaclejapan.smarttablayout.SmartTabLayout
            android:id="@+id/smart_tab_layout"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:background="@color/blue"
            app:stl_defaultTabBackground="?attr/selectableItemBackground"
            app:stl_defaultTabTextAllCaps="false"
            app:stl_defaultTabTextColor="@color/white"
            app:stl_defaultTabTextHorizontalPadding="12dp"
            app:stl_defaultTabTextMinWidth="0dp"
            app:stl_defaultTabTextSize="16sp"
            app:stl_distributeEvenly="true"
            app:stl_dividerThickness="0dp"
            app:stl_indicatorAlwaysInCenter="false"
            app:stl_indicatorColor="@color/blue_accent"
            app:stl_indicatorCornerRadius="2dp"
            app:stl_indicatorInFront="false"
            app:stl_indicatorInterpolation="smart"
            app:stl_indicatorThickness="4dp"
            app:stl_underlineThickness="0dp" />

        <android.support.v4.view.ViewPager
            android:id="@+id/view_pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </LinearLayout>

    <ListView
        android:id="@+id/left_drawer"
        android:layout_width="240dp"
        android:layout_height="fill_parent"
        android:background="#333" />

    <FrameLayout
        android:id="@+id/frame_layout_left"
        android:layout_width="280dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@color/white" />


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

`

and onCreate() of BaseActivity i write just

drawerListViewItems = getResources().getStringArray(R.array.items); drawerListView = (ListView) findViewById(R.id.left_drawer); drawerListView.setAdapter(new ArrayAdapter<String>(this, R.layout.drawer_listview_item, drawerListViewItems));

is it am i missing something..??? the listview is set on main Layout. can u please help me..

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant