-
-
Save SwordBearer/ae859991fffcf3c7f5c2 to your computer and use it in GitHub Desktop.
InstaMaterial source files - Design Support Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appBarLayout" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:id="@+id/collapsing_toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:contentScrim="?attr/colorPrimary" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed"> | |
<LinearLayout | |
android:id="@+id/vUserProfileRoot" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?attr/colorPrimary" | |
app:layout_collapseMode="parallax"> | |
</LinearLayout> | |
<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_collapseMode="pin" | |
app:layout_scrollFlags="scroll|enterAlways" | |
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | |
</android.support.v7.widget.Toolbar> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
<android.support.design.widget.TabLayout | |
android:id="@+id/tlUserProfileTabs" | |
android:layout_width="match_parent" | |
android:layout_height="48dp" | |
android:background="?attr/colorAccent" | |
app:tabGravity="fill" | |
app:tabMode="fixed" /> | |
</android.support.design.widget.AppBarLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.CoordinatorLayout | |
android:id="@+id/content" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/rvFeed" | |
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/appBarLayout" | |
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:background="?attr/colorPrimary" | |
app:elevation="@dimen/default_elevation" | |
app:layout_scrollFlags="scroll|enterAlways" | |
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | |
<ImageView | |
android:id="@+id/ivLogo" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_gravity="center" | |
android:scaleType="center" | |
android:src="@drawable/img_toolbar_logo" /> | |
</android.support.v7.widget.Toolbar> | |
</android.support.design.widget.AppBarLayout> | |
</android.support.design.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.FloatingActionButton | |
android:id="@+id/btnCreate" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom|right" | |
android:layout_marginBottom="@dimen/btn_fab_margins" | |
android:layout_marginRight="@dimen/btn_fab_margins" | |
android:src="@drawable/ic_instagram_white" | |
app:borderWidth="0dp" | |
app:elevation="6dp" | |
app:pressedTranslationZ="12dp" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void showLikedSnackbar() { | |
Snackbar.make(clContent, "Liked!", Snackbar.LENGTH_SHORT).show(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.TabLayout | |
android:id="@+id/tlUserProfileTabs" | |
android:layout_width="match_parent" | |
android:layout_height="48dp" | |
android:background="?attr/colorAccent" | |
app:tabGravity="fill" | |
app:tabIndicatorColor="#5be5ad" | |
app:tabIndicatorHeight="4dp" | |
app:tabMode="fixed" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void setupTabs() { | |
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setIcon(R.drawable.ic_grid_on_white)); | |
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setIcon(R.drawable.ic_list_white)); | |
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setIcon(R.drawable.ic_place_white)); | |
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setIcon(R.drawable.ic_label_white)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment