Skip to content

Instantly share code, notes, and snippets.

View sakdaped200's full-sized avatar
💭
I may be slow to respond.

Sakda P. sakdaped200

💭
I may be slow to respond.
View GitHub Profile
package mostsofus.swipeviewtabs;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class GamesFragment extends Fragment {
@sakdaped200
sakdaped200 / TabsPagerAdapter.java
Created October 5, 2015 04:43
Demo-SwipeViewTap :: Source Code
package mostsofus.swipeviewtabs;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
public class TabsPagerAdapter extends FragmentPagerAdapter {
String[] titles = {"TOP Rate", "Games", "Movies"};
@sakdaped200
sakdaped200 / MainActivity.java
Last active October 5, 2015 04:41
Demo-SwipeViewTap :: Source Code
package mostsofus.swipeviewtabs;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import com.astuetz.PagerSlidingTabStrip;
@sakdaped200
sakdaped200 / games_fragment.xml
Last active October 5, 2015 04:41
Demo-SwipeViewTap :: Source Code :: สร้าง layout แบบเดียวกันนี้อีก 2 ตัว คืด movies_fragment.xml, toprate_fragment.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffdd9b2a"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:gravity="center"
android:textStyle="bold|italic"
@sakdaped200
sakdaped200 / activity_main.xml
Last active October 5, 2015 04:41
Demo-SwipeViewTap :: Source Code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip" />