This file contains hidden or 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 class MainActivity extends AppCompatActivity { | |
| private RecyclerView mRecyclerView; | |
| private RecyclerView.LayoutManager mLayoutManager; | |
| private RecyclerView.Adapter mAdapter; | |
| private List<Person> persons; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); |
This file contains hidden or 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
| /** | |
| * Created by Emin on 1/2/2016. | |
| */ | |
| public class Person { | |
| private String name; | |
| private String age; | |
| private int photoId; | |
| public Person(String name, String age, int photoId) { | |
| this.name = name; |
This file contains hidden or 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
| /** | |
| * Created by Emin on 1/2/2016. | |
| */ | |
| public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { | |
| private List<Person> mPersons; | |
| // Provide a reference to the views for each data item | |
| // Complex data items may need more than one view per item, and | |
| // you provide access to all the views for a data item in a view holder | |
| public static class ViewHolder extends RecyclerView.ViewHolder { |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <android.support.v7.widget.CardView | |
| 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="120dp" | |
| app:cardCornerRadius="4dp" | |
| android:padding="16dp" | |
| android:layout_margin="4dp" | |
| app:cardElevation="2dp" |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:fitsSystemWindows="true" | |
| tools:context="com.taurus.collapsingtoolbarexample.MainActivity"> |
This file contains hidden or 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
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 23 | |
| buildToolsVersion "23.0.1" | |
| defaultConfig { | |
| applicationId "com.taurus.collapsingtoolbarexample" | |
| minSdkVersion 11 | |
| targetSdkVersion 23 |
This file contains hidden or 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
| package com.taurus.emin.tablayoutandnavigationviewexample; | |
| import android.os.Bundle; | |
| import android.support.design.widget.NavigationView; | |
| import android.support.design.widget.TabLayout; | |
| import android.support.v4.view.GravityCompat; | |
| import android.support.v4.view.ViewPager; | |
| import android.support.v4.widget.DrawerLayout; | |
| import android.support.v7.app.ActionBarDrawerToggle; | |
| import android.support.v7.app.AppCompatActivity; |
This file contains hidden or 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
| package com.taurus.emin.tablayoutandnavigationviewexample; | |
| import android.os.Bundle; | |
| import android.support.v4.app.Fragment; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
This file contains hidden or 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
| package com.taurus.emin.tablayoutandnavigationviewexample.adapters; | |
| import android.content.Context; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.FragmentManager; | |
| import android.support.v4.app.FragmentPagerAdapter; | |
| import com.taurus.emin.tablayoutandnavigationviewexample.FirstFragment; | |
| import com.taurus.emin.tablayoutandnavigationviewexample.R; | |
| import com.taurus.emin.tablayoutandnavigationviewexample.SecondFragment; |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <RelativeLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:id="@+id/profile_content" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:layout_marginTop="56dp" | |
| android:fitsSystemWindows="true"> |
NewerOlder