[
  {
    "path": ".google/packaging.yaml",
    "content": "\n# GOOGLE SAMPLE PACKAGING DATA\n#\n# This file is used by Google as part of our samples packaging process.\n# End users may safely ignore this file. It has no relevance to other systems.\n---\nstatus:       PUBLISHED\ntechnologies: [Android]\ncategories:   [UI]\nlanguages:    [Java]\nsolutions:    [Mobile]\ngithub:       android-SlidingTabsBasic\nlicense: apache2\n"
  },
  {
    "path": "Application/build.gradle",
    "content": "\nbuildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.0.1'\n    }\n}\n\napply plugin: 'com.android.application'\n\nrepositories {\n    jcenter()\n    google()\n}\n\ndependencies {\n    compile \"com.android.support:support-v4:27.0.2\"\n    compile \"com.android.support:support-v13:27.0.2\"\n    compile \"com.android.support:cardview-v7:27.0.2\"\n    compile \"com.android.support:appcompat-v7:27.0.2\"\n}\n\n// The sample build uses multiple directories to\n// keep boilerplate and common code separate from\n// the main sample code.\nList<String> dirs = [\n    'main',     // main sample code; look here for the interesting stuff.\n    'common',   // components that are reused by multiple samples\n    'template'] // boilerplate code that is generated by the sample template process\n\nandroid {\n    compileSdkVersion 27\n\n    buildToolsVersion \"27.0.2\"\n\n    defaultConfig {\n        minSdkVersion 14\n        targetSdkVersion 27\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_7\n        targetCompatibility JavaVersion.VERSION_1_7\n    }\n\n    sourceSets {\n        main {\n            dirs.each { dir ->\n                java.srcDirs \"src/${dir}/java\"\n                res.srcDirs \"src/${dir}/res\"\n            }\n        }\n        androidTest.setRoot('tests')\n        androidTest.java.srcDirs = ['tests/src']\n\n    }\n\n}\n"
  },
  {
    "path": "Application/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n\n\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.android.slidingtabsbasic\"\n    android:versionCode=\"1\"\n    android:versionName=\"1.0\">\n\n    <!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->\n\n    <application android:allowBackup=\"true\"\n        android:label=\"@string/app_name\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:theme=\"@style/AppTheme\">\n\n        <activity android:name=\".MainActivity\"\n                  android:label=\"@string/app_name\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n\n</manifest>\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/activities/SampleActivityBase.java",
    "content": "/*\n* Copyright 2013 The Android Open Source Project\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\npackage com.example.android.common.activities;\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\n\nimport com.example.android.common.logger.Log;\nimport com.example.android.common.logger.LogWrapper;\n\n/**\n * Base launcher activity, to handle most of the common plumbing for samples.\n */\npublic class SampleActivityBase extends FragmentActivity {\n\n    public static final String TAG = \"SampleActivityBase\";\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n    }\n\n    @Override\n    protected  void onStart() {\n        super.onStart();\n        initializeLogging();\n    }\n\n    /** Set up targets to receive log data */\n    public void initializeLogging() {\n        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.\n        // Wraps Android's native log framework\n        LogWrapper logWrapper = new LogWrapper();\n        Log.setLogNode(logWrapper);\n\n        Log.i(TAG, \"Ready\");\n    }\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/Log.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.example.android.common.logger;\n\n/**\n * Helper class for a list (or tree) of LoggerNodes.\n *\n * <p>When this is set as the head of the list,\n * an instance of it can function as a drop-in replacement for {@link android.util.Log}.\n * Most of the methods in this class server only to map a method call in Log to its equivalent\n * in LogNode.</p>\n */\npublic class Log {\n    // Grabbing the native values from Android's native logging facilities,\n    // to make for easy migration and interop.\n    public static final int NONE = -1;\n    public static final int VERBOSE = android.util.Log.VERBOSE;\n    public static final int DEBUG = android.util.Log.DEBUG;\n    public static final int INFO = android.util.Log.INFO;\n    public static final int WARN = android.util.Log.WARN;\n    public static final int ERROR = android.util.Log.ERROR;\n    public static final int ASSERT = android.util.Log.ASSERT;\n\n    // Stores the beginning of the LogNode topology.\n    private static LogNode mLogNode;\n\n    /**\n     * Returns the next LogNode in the linked list.\n     */\n    public static LogNode getLogNode() {\n        return mLogNode;\n    }\n\n    /**\n     * Sets the LogNode data will be sent to.\n     */\n    public static void setLogNode(LogNode node) {\n        mLogNode = node;\n    }\n\n    /**\n     * Instructs the LogNode to print the log data provided. Other LogNodes can\n     * be chained to the end of the LogNode as desired.\n     *\n     * @param priority Log level of the data being logged. Verbose, Error, etc.\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void println(int priority, String tag, String msg, Throwable tr) {\n        if (mLogNode != null) {\n            mLogNode.println(priority, tag, msg, tr);\n        }\n    }\n\n    /**\n     * Instructs the LogNode to print the log data provided. Other LogNodes can\n     * be chained to the end of the LogNode as desired.\n     *\n     * @param priority Log level of the data being logged. Verbose, Error, etc.\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged. The actual message to be logged.\n     */\n    public static void println(int priority, String tag, String msg) {\n        println(priority, tag, msg, null);\n    }\n\n   /**\n     * Prints a message at VERBOSE priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void v(String tag, String msg, Throwable tr) {\n        println(VERBOSE, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at VERBOSE priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void v(String tag, String msg) {\n        v(tag, msg, null);\n    }\n\n\n    /**\n     * Prints a message at DEBUG priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void d(String tag, String msg, Throwable tr) {\n        println(DEBUG, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at DEBUG priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void d(String tag, String msg) {\n        d(tag, msg, null);\n    }\n\n    /**\n     * Prints a message at INFO priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void i(String tag, String msg, Throwable tr) {\n        println(INFO, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at INFO priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void i(String tag, String msg) {\n        i(tag, msg, null);\n    }\n\n    /**\n     * Prints a message at WARN priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void w(String tag, String msg, Throwable tr) {\n        println(WARN, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at WARN priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void w(String tag, String msg) {\n        w(tag, msg, null);\n    }\n\n    /**\n     * Prints a message at WARN priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void w(String tag, Throwable tr) {\n        w(tag, null, tr);\n    }\n\n    /**\n     * Prints a message at ERROR priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void e(String tag, String msg, Throwable tr) {\n        println(ERROR, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at ERROR priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void e(String tag, String msg) {\n        e(tag, msg, null);\n    }\n\n    /**\n     * Prints a message at ASSERT priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void wtf(String tag, String msg, Throwable tr) {\n        println(ASSERT, tag, msg, tr);\n    }\n\n    /**\n     * Prints a message at ASSERT priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param msg The actual message to be logged.\n     */\n    public static void wtf(String tag, String msg) {\n        wtf(tag, msg, null);\n    }\n\n    /**\n     * Prints a message at ASSERT priority.\n     *\n     * @param tag Tag for for the log data. Can be used to organize log statements.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public static void wtf(String tag, Throwable tr) {\n        wtf(tag, null, tr);\n    }\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/LogFragment.java",
    "content": "/*\n* Copyright 2013 The Android Open Source Project\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/*\n * Copyright 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.example.android.common.logger;\n\nimport android.graphics.Typeface;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.text.Editable;\nimport android.text.TextWatcher;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ScrollView;\n\n/**\n * Simple fraggment which contains a LogView and uses is to output log data it receives\n * through the LogNode interface.\n */\npublic class LogFragment extends Fragment {\n\n    private LogView mLogView;\n    private ScrollView mScrollView;\n\n    public LogFragment() {}\n\n    public View inflateViews() {\n        mScrollView = new ScrollView(getActivity());\n        ViewGroup.LayoutParams scrollParams = new ViewGroup.LayoutParams(\n                ViewGroup.LayoutParams.MATCH_PARENT,\n                ViewGroup.LayoutParams.MATCH_PARENT);\n        mScrollView.setLayoutParams(scrollParams);\n\n        mLogView = new LogView(getActivity());\n        ViewGroup.LayoutParams logParams = new ViewGroup.LayoutParams(scrollParams);\n        logParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;\n        mLogView.setLayoutParams(logParams);\n        mLogView.setClickable(true);\n        mLogView.setFocusable(true);\n        mLogView.setTypeface(Typeface.MONOSPACE);\n\n        // Want to set padding as 16 dips, setPadding takes pixels.  Hooray math!\n        int paddingDips = 16;\n        double scale = getResources().getDisplayMetrics().density;\n        int paddingPixels = (int) ((paddingDips * (scale)) + .5);\n        mLogView.setPadding(paddingPixels, paddingPixels, paddingPixels, paddingPixels);\n        mLogView.setCompoundDrawablePadding(paddingPixels);\n\n        mLogView.setGravity(Gravity.BOTTOM);\n        mLogView.setTextAppearance(getActivity(), android.R.style.TextAppearance_Holo_Medium);\n\n        mScrollView.addView(mLogView);\n        return mScrollView;\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                             Bundle savedInstanceState) {\n\n        View result = inflateViews();\n\n        mLogView.addTextChangedListener(new TextWatcher() {\n            @Override\n            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n            @Override\n            public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n            @Override\n            public void afterTextChanged(Editable s) {\n                mScrollView.fullScroll(ScrollView.FOCUS_DOWN);\n            }\n        });\n        return result;\n    }\n\n    public LogView getLogView() {\n        return mLogView;\n    }\n}"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/LogNode.java",
    "content": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.example.android.common.logger;\n\n/**\n * Basic interface for a logging system that can output to one or more targets.\n * Note that in addition to classes that will output these logs in some format,\n * one can also implement this interface over a filter and insert that in the chain,\n * such that no targets further down see certain data, or see manipulated forms of the data.\n * You could, for instance, write a \"ToHtmlLoggerNode\" that just converted all the log data\n * it received to HTML and sent it along to the next node in the chain, without printing it\n * anywhere.\n */\npublic interface LogNode {\n\n    /**\n     * Instructs first LogNode in the list to print the log data provided.\n     * @param priority Log level of the data being logged.  Verbose, Error, etc.\n     * @param tag Tag for for the log data.  Can be used to organize log statements.\n     * @param msg The actual message to be logged. The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    public void println(int priority, String tag, String msg, Throwable tr);\n\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/LogView.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.example.android.common.logger;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.util.*;\nimport android.widget.TextView;\n\n/** Simple TextView which is used to output log data received through the LogNode interface.\n*/\npublic class LogView extends TextView implements LogNode {\n\n    public LogView(Context context) {\n        super(context);\n    }\n\n    public LogView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    public LogView(Context context, AttributeSet attrs, int defStyle) {\n        super(context, attrs, defStyle);\n    }\n\n    /**\n     * Formats the log data and prints it out to the LogView.\n     * @param priority Log level of the data being logged.  Verbose, Error, etc.\n     * @param tag Tag for for the log data.  Can be used to organize log statements.\n     * @param msg The actual message to be logged. The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    @Override\n    public void println(int priority, String tag, String msg, Throwable tr) {\n\n        \n        String priorityStr = null;\n\n        // For the purposes of this View, we want to print the priority as readable text.\n        switch(priority) {\n            case android.util.Log.VERBOSE:\n                priorityStr = \"VERBOSE\";\n                break;\n            case android.util.Log.DEBUG:\n                priorityStr = \"DEBUG\";\n                break;\n            case android.util.Log.INFO:\n                priorityStr = \"INFO\";\n                break;\n            case android.util.Log.WARN:\n                priorityStr = \"WARN\";\n                break;\n            case android.util.Log.ERROR:\n                priorityStr = \"ERROR\";\n                break;\n            case android.util.Log.ASSERT:\n                priorityStr = \"ASSERT\";\n                break;\n            default:\n                break;\n        }\n\n        // Handily, the Log class has a facility for converting a stack trace into a usable string.\n        String exceptionStr = null;\n        if (tr != null) {\n            exceptionStr = android.util.Log.getStackTraceString(tr);\n        }\n\n        // Take the priority, tag, message, and exception, and concatenate as necessary\n        // into one usable line of text.\n        final StringBuilder outputBuilder = new StringBuilder();\n\n        String delimiter = \"\\t\";\n        appendIfNotNull(outputBuilder, priorityStr, delimiter);\n        appendIfNotNull(outputBuilder, tag, delimiter);\n        appendIfNotNull(outputBuilder, msg, delimiter);\n        appendIfNotNull(outputBuilder, exceptionStr, delimiter);\n\n        // In case this was originally called from an AsyncTask or some other off-UI thread,\n        // make sure the update occurs within the UI thread.\n        ((Activity) getContext()).runOnUiThread( (new Thread(new Runnable() {\n            @Override\n            public void run() {\n                // Display the text we just generated within the LogView.\n                appendToLog(outputBuilder.toString());\n            }\n        })));\n\n        if (mNext != null) {\n            mNext.println(priority, tag, msg, tr);\n        }\n    }\n\n    public LogNode getNext() {\n        return mNext;\n    }\n\n    public void setNext(LogNode node) {\n        mNext = node;\n    }\n\n    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since\n     * the logger takes so many arguments that might be null, this method helps cut out some of the\n     * agonizing tedium of writing the same 3 lines over and over.\n     * @param source StringBuilder containing the text to append to.\n     * @param addStr The String to append\n     * @param delimiter The String to separate the source and appended strings. A tab or comma,\n     *                  for instance.\n     * @return The fully concatenated String as a StringBuilder\n     */\n    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {\n        if (addStr != null) {\n            if (addStr.length() == 0) {\n                delimiter = \"\";\n            }\n\n            return source.append(addStr).append(delimiter);\n        }\n        return source;\n    }\n\n    // The next LogNode in the chain.\n    LogNode mNext;\n\n    /** Outputs the string as a new line of log data in the LogView. */\n    public void appendToLog(String s) {\n        append(\"\\n\" + s);\n    }\n\n\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/LogWrapper.java",
    "content": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.example.android.common.logger;\n\nimport android.util.Log;\n\n/**\n * Helper class which wraps Android's native Log utility in the Logger interface.  This way\n * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.\n */\npublic class LogWrapper implements LogNode {\n\n    // For piping:  The next node to receive Log data after this one has done its work.\n    private LogNode mNext;\n\n    /**\n     * Returns the next LogNode in the linked list.\n     */\n    public LogNode getNext() {\n        return mNext;\n    }\n\n    /**\n     * Sets the LogNode data will be sent to..\n     */\n    public void setNext(LogNode node) {\n        mNext = node;\n    }\n\n    /**\n     * Prints data out to the console using Android's native log mechanism.\n     * @param priority Log level of the data being logged.  Verbose, Error, etc.\n     * @param tag Tag for for the log data.  Can be used to organize log statements.\n     * @param msg The actual message to be logged. The actual message to be logged.\n     * @param tr If an exception was thrown, this can be sent along for the logging facilities\n     *           to extract and print useful information.\n     */\n    @Override\n    public void println(int priority, String tag, String msg, Throwable tr) {\n        // There actually are log methods that don't take a msg parameter.  For now,\n        // if that's the case, just convert null to the empty string and move on.\n        String useMsg = msg;\n        if (useMsg == null) {\n            useMsg = \"\";\n        }\n\n        // If an exeption was provided, convert that exception to a usable string and attach\n        // it to the end of the msg method.\n        if (tr != null) {\n            msg += \"\\n\" + Log.getStackTraceString(tr);\n        }\n\n        // This is functionally identical to Log.x(tag, useMsg);\n        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)\n        Log.println(priority, tag, useMsg);\n\n        // If this isn't the last node in the chain, move things along.\n        if (mNext != null) {\n            mNext.println(priority, tag, msg, tr);\n        }\n    }\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.example.android.common.logger;\n\n/**\n * Simple {@link LogNode} filter, removes everything except the message.\n * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,\n * just easy-to-read message updates as they're happening.\n */\npublic class MessageOnlyLogFilter implements LogNode {\n\n    LogNode mNext;\n\n    /**\n     * Takes the \"next\" LogNode as a parameter, to simplify chaining.\n     *\n     * @param next The next LogNode in the pipeline.\n     */\n    public MessageOnlyLogFilter(LogNode next) {\n        mNext = next;\n    }\n\n    public MessageOnlyLogFilter() {\n    }\n\n    @Override\n    public void println(int priority, String tag, String msg, Throwable tr) {\n        if (mNext != null) {\n            getNext().println(Log.NONE, null, msg, null);\n        }\n    }\n\n    /**\n     * Returns the next LogNode in the chain.\n     */\n    public LogNode getNext() {\n        return mNext;\n    }\n\n    /**\n     * Sets the LogNode data will be sent to..\n     */\n    public void setNext(LogNode node) {\n        mNext = node;\n    }\n\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/view/SlidingTabLayout.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.example.android.common.view;\n\nimport android.content.Context;\nimport android.graphics.Typeface;\nimport android.os.Build;\nimport android.support.v4.view.PagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.widget.HorizontalScrollView;\nimport android.widget.TextView;\n\n/**\n * To be used with ViewPager to provide a tab indicator component which give constant feedback as to\n * the user's scroll progress.\n * <p>\n * To use the component, simply add it to your view hierarchy. Then in your\n * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call\n * {@link #setViewPager(ViewPager)} providing it the ViewPager this layout is being used for.\n * <p>\n * The colors can be customized in two ways. The first and simplest is to provide an array of colors\n * via {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)}. The\n * alternative is via the {@link TabColorizer} interface which provides you complete control over\n * which color is used for any individual position.\n * <p>\n * The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)},\n * providing the layout ID of your custom layout.\n */\npublic class SlidingTabLayout extends HorizontalScrollView {\n\n    /**\n     * Allows complete control over the colors drawn in the tab layout. Set with\n     * {@link #setCustomTabColorizer(TabColorizer)}.\n     */\n    public interface TabColorizer {\n\n        /**\n         * @return return the color of the indicator used when {@code position} is selected.\n         */\n        int getIndicatorColor(int position);\n\n        /**\n         * @return return the color of the divider drawn to the right of {@code position}.\n         */\n        int getDividerColor(int position);\n\n    }\n\n    private static final int TITLE_OFFSET_DIPS = 24;\n    private static final int TAB_VIEW_PADDING_DIPS = 16;\n    private static final int TAB_VIEW_TEXT_SIZE_SP = 12;\n\n    private int mTitleOffset;\n\n    private int mTabViewLayoutId;\n    private int mTabViewTextViewId;\n\n    private ViewPager mViewPager;\n    private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;\n\n    private final SlidingTabStrip mTabStrip;\n\n    public SlidingTabLayout(Context context) {\n        this(context, null);\n    }\n\n    public SlidingTabLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {\n        super(context, attrs, defStyle);\n\n        // Disable the Scroll Bar\n        setHorizontalScrollBarEnabled(false);\n        // Make sure that the Tab Strips fills this View\n        setFillViewport(true);\n\n        mTitleOffset = (int) (TITLE_OFFSET_DIPS * getResources().getDisplayMetrics().density);\n\n        mTabStrip = new SlidingTabStrip(context);\n        addView(mTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n    }\n\n    /**\n     * Set the custom {@link TabColorizer} to be used.\n     *\n     * If you only require simple custmisation then you can use\n     * {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)} to achieve\n     * similar effects.\n     */\n    public void setCustomTabColorizer(TabColorizer tabColorizer) {\n        mTabStrip.setCustomTabColorizer(tabColorizer);\n    }\n\n    /**\n     * Sets the colors to be used for indicating the selected tab. These colors are treated as a\n     * circular array. Providing one color will mean that all tabs are indicated with the same color.\n     */\n    public void setSelectedIndicatorColors(int... colors) {\n        mTabStrip.setSelectedIndicatorColors(colors);\n    }\n\n    /**\n     * Sets the colors to be used for tab dividers. These colors are treated as a circular array.\n     * Providing one color will mean that all tabs are indicated with the same color.\n     */\n    public void setDividerColors(int... colors) {\n        mTabStrip.setDividerColors(colors);\n    }\n\n    /**\n     * Set the {@link ViewPager.OnPageChangeListener}. When using {@link SlidingTabLayout} you are\n     * required to set any {@link ViewPager.OnPageChangeListener} through this method. This is so\n     * that the layout can update it's scroll position correctly.\n     *\n     * @see ViewPager#setOnPageChangeListener(ViewPager.OnPageChangeListener)\n     */\n    public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {\n        mViewPagerPageChangeListener = listener;\n    }\n\n    /**\n     * Set the custom layout to be inflated for the tab views.\n     *\n     * @param layoutResId Layout id to be inflated\n     * @param textViewId id of the {@link TextView} in the inflated view\n     */\n    public void setCustomTabView(int layoutResId, int textViewId) {\n        mTabViewLayoutId = layoutResId;\n        mTabViewTextViewId = textViewId;\n    }\n\n    /**\n     * Sets the associated view pager. Note that the assumption here is that the pager content\n     * (number of tabs and tab titles) does not change after this call has been made.\n     */\n    public void setViewPager(ViewPager viewPager) {\n        mTabStrip.removeAllViews();\n\n        mViewPager = viewPager;\n        if (viewPager != null) {\n            viewPager.setOnPageChangeListener(new InternalViewPagerListener());\n            populateTabStrip();\n        }\n    }\n\n    /**\n     * Create a default view to be used for tabs. This is called if a custom tab view is not set via\n     * {@link #setCustomTabView(int, int)}.\n     */\n    protected TextView createDefaultTabView(Context context) {\n        TextView textView = new TextView(context);\n        textView.setGravity(Gravity.CENTER);\n        textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);\n        textView.setTypeface(Typeface.DEFAULT_BOLD);\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            // If we're running on Honeycomb or newer, then we can use the Theme's\n            // selectableItemBackground to ensure that the View has a pressed state\n            TypedValue outValue = new TypedValue();\n            getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,\n                    outValue, true);\n            textView.setBackgroundResource(outValue.resourceId);\n        }\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n            // If we're running on ICS or newer, enable all-caps to match the Action Bar tab style\n            textView.setAllCaps(true);\n        }\n\n        int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);\n        textView.setPadding(padding, padding, padding, padding);\n\n        return textView;\n    }\n\n    private void populateTabStrip() {\n        final PagerAdapter adapter = mViewPager.getAdapter();\n        final View.OnClickListener tabClickListener = new TabClickListener();\n\n        for (int i = 0; i < adapter.getCount(); i++) {\n            View tabView = null;\n            TextView tabTitleView = null;\n\n            if (mTabViewLayoutId != 0) {\n                // If there is a custom tab view layout id set, try and inflate it\n                tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip,\n                        false);\n                tabTitleView = (TextView) tabView.findViewById(mTabViewTextViewId);\n            }\n\n            if (tabView == null) {\n                tabView = createDefaultTabView(getContext());\n            }\n\n            if (tabTitleView == null && TextView.class.isInstance(tabView)) {\n                tabTitleView = (TextView) tabView;\n            }\n\n            tabTitleView.setText(adapter.getPageTitle(i));\n            tabView.setOnClickListener(tabClickListener);\n\n            mTabStrip.addView(tabView);\n        }\n    }\n\n    @Override\n    protected void onAttachedToWindow() {\n        super.onAttachedToWindow();\n\n        if (mViewPager != null) {\n            scrollToTab(mViewPager.getCurrentItem(), 0);\n        }\n    }\n\n    private void scrollToTab(int tabIndex, int positionOffset) {\n        final int tabStripChildCount = mTabStrip.getChildCount();\n        if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) {\n            return;\n        }\n\n        View selectedChild = mTabStrip.getChildAt(tabIndex);\n        if (selectedChild != null) {\n            int targetScrollX = selectedChild.getLeft() + positionOffset;\n\n            if (tabIndex > 0 || positionOffset > 0) {\n                // If we're not at the first child and are mid-scroll, make sure we obey the offset\n                targetScrollX -= mTitleOffset;\n            }\n\n            scrollTo(targetScrollX, 0);\n        }\n    }\n\n    private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {\n        private int mScrollState;\n\n        @Override\n        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n            int tabStripChildCount = mTabStrip.getChildCount();\n            if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {\n                return;\n            }\n\n            mTabStrip.onViewPagerPageChanged(position, positionOffset);\n\n            View selectedTitle = mTabStrip.getChildAt(position);\n            int extraOffset = (selectedTitle != null)\n                    ? (int) (positionOffset * selectedTitle.getWidth())\n                    : 0;\n            scrollToTab(position, extraOffset);\n\n            if (mViewPagerPageChangeListener != null) {\n                mViewPagerPageChangeListener.onPageScrolled(position, positionOffset,\n                        positionOffsetPixels);\n            }\n        }\n\n        @Override\n        public void onPageScrollStateChanged(int state) {\n            mScrollState = state;\n\n            if (mViewPagerPageChangeListener != null) {\n                mViewPagerPageChangeListener.onPageScrollStateChanged(state);\n            }\n        }\n\n        @Override\n        public void onPageSelected(int position) {\n            if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {\n                mTabStrip.onViewPagerPageChanged(position, 0f);\n                scrollToTab(position, 0);\n            }\n\n            if (mViewPagerPageChangeListener != null) {\n                mViewPagerPageChangeListener.onPageSelected(position);\n            }\n        }\n\n    }\n\n    private class TabClickListener implements View.OnClickListener {\n        @Override\n        public void onClick(View v) {\n            for (int i = 0; i < mTabStrip.getChildCount(); i++) {\n                if (v == mTabStrip.getChildAt(i)) {\n                    mViewPager.setCurrentItem(i);\n                    return;\n                }\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/common/view/SlidingTabStrip.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.example.android.common.view;\n\nimport android.R;\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.view.View;\nimport android.widget.LinearLayout;\n\nclass SlidingTabStrip extends LinearLayout {\n\n    private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 2;\n    private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26;\n    private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 8;\n    private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5;\n\n    private static final int DEFAULT_DIVIDER_THICKNESS_DIPS = 1;\n    private static final byte DEFAULT_DIVIDER_COLOR_ALPHA = 0x20;\n    private static final float DEFAULT_DIVIDER_HEIGHT = 0.5f;\n\n    private final int mBottomBorderThickness;\n    private final Paint mBottomBorderPaint;\n\n    private final int mSelectedIndicatorThickness;\n    private final Paint mSelectedIndicatorPaint;\n\n    private final int mDefaultBottomBorderColor;\n\n    private final Paint mDividerPaint;\n    private final float mDividerHeight;\n\n    private int mSelectedPosition;\n    private float mSelectionOffset;\n\n    private SlidingTabLayout.TabColorizer mCustomTabColorizer;\n    private final SimpleTabColorizer mDefaultTabColorizer;\n\n    SlidingTabStrip(Context context) {\n        this(context, null);\n    }\n\n    SlidingTabStrip(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        setWillNotDraw(false);\n\n        final float density = getResources().getDisplayMetrics().density;\n\n        TypedValue outValue = new TypedValue();\n        context.getTheme().resolveAttribute(R.attr.colorForeground, outValue, true);\n        final int themeForegroundColor =  outValue.data;\n\n        mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor,\n                DEFAULT_BOTTOM_BORDER_COLOR_ALPHA);\n\n        mDefaultTabColorizer = new SimpleTabColorizer();\n        mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR);\n        mDefaultTabColorizer.setDividerColors(setColorAlpha(themeForegroundColor,\n                DEFAULT_DIVIDER_COLOR_ALPHA));\n\n        mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density);\n        mBottomBorderPaint = new Paint();\n        mBottomBorderPaint.setColor(mDefaultBottomBorderColor);\n\n        mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density);\n        mSelectedIndicatorPaint = new Paint();\n\n        mDividerHeight = DEFAULT_DIVIDER_HEIGHT;\n        mDividerPaint = new Paint();\n        mDividerPaint.setStrokeWidth((int) (DEFAULT_DIVIDER_THICKNESS_DIPS * density));\n    }\n\n    void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) {\n        mCustomTabColorizer = customTabColorizer;\n        invalidate();\n    }\n\n    void setSelectedIndicatorColors(int... colors) {\n        // Make sure that the custom colorizer is removed\n        mCustomTabColorizer = null;\n        mDefaultTabColorizer.setIndicatorColors(colors);\n        invalidate();\n    }\n\n    void setDividerColors(int... colors) {\n        // Make sure that the custom colorizer is removed\n        mCustomTabColorizer = null;\n        mDefaultTabColorizer.setDividerColors(colors);\n        invalidate();\n    }\n\n    void onViewPagerPageChanged(int position, float positionOffset) {\n        mSelectedPosition = position;\n        mSelectionOffset = positionOffset;\n        invalidate();\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        final int height = getHeight();\n        final int childCount = getChildCount();\n        final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height);\n        final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null\n                ? mCustomTabColorizer\n                : mDefaultTabColorizer;\n\n        // Thick colored underline below the current selection\n        if (childCount > 0) {\n            View selectedTitle = getChildAt(mSelectedPosition);\n            int left = selectedTitle.getLeft();\n            int right = selectedTitle.getRight();\n            int color = tabColorizer.getIndicatorColor(mSelectedPosition);\n\n            if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) {\n                int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1);\n                if (color != nextColor) {\n                    color = blendColors(nextColor, color, mSelectionOffset);\n                }\n\n                // Draw the selection partway between the tabs\n                View nextTitle = getChildAt(mSelectedPosition + 1);\n                left = (int) (mSelectionOffset * nextTitle.getLeft() +\n                        (1.0f - mSelectionOffset) * left);\n                right = (int) (mSelectionOffset * nextTitle.getRight() +\n                        (1.0f - mSelectionOffset) * right);\n            }\n\n            mSelectedIndicatorPaint.setColor(color);\n\n            canvas.drawRect(left, height - mSelectedIndicatorThickness, right,\n                    height, mSelectedIndicatorPaint);\n        }\n\n        // Thin underline along the entire bottom edge\n        canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint);\n\n        // Vertical separators between the titles\n        int separatorTop = (height - dividerHeightPx) / 2;\n        for (int i = 0; i < childCount - 1; i++) {\n            View child = getChildAt(i);\n            mDividerPaint.setColor(tabColorizer.getDividerColor(i));\n            canvas.drawLine(child.getRight(), separatorTop, child.getRight(),\n                    separatorTop + dividerHeightPx, mDividerPaint);\n        }\n    }\n\n    /**\n     * Set the alpha value of the {@code color} to be the given {@code alpha} value.\n     */\n    private static int setColorAlpha(int color, byte alpha) {\n        return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));\n    }\n\n    /**\n     * Blend {@code color1} and {@code color2} using the given ratio.\n     *\n     * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend,\n     *              0.0 will return {@code color2}.\n     */\n    private static int blendColors(int color1, int color2, float ratio) {\n        final float inverseRation = 1f - ratio;\n        float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation);\n        float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation);\n        float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation);\n        return Color.rgb((int) r, (int) g, (int) b);\n    }\n\n    private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer {\n        private int[] mIndicatorColors;\n        private int[] mDividerColors;\n\n        @Override\n        public final int getIndicatorColor(int position) {\n            return mIndicatorColors[position % mIndicatorColors.length];\n        }\n\n        @Override\n        public final int getDividerColor(int position) {\n            return mDividerColors[position % mDividerColors.length];\n        }\n\n        void setIndicatorColors(int... colors) {\n            mIndicatorColors = colors;\n        }\n\n        void setDividerColors(int... colors) {\n            mDividerColors = colors;\n        }\n    }\n}"
  },
  {
    "path": "Application/src/main/java/com/example/android/slidingtabsbasic/MainActivity.java",
    "content": "/*\n* Copyright 2013 The Android Open Source Project\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*     http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n\npackage com.example.android.slidingtabsbasic;\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentTransaction;\nimport android.view.Menu;\nimport android.view.MenuItem;\nimport android.widget.ViewAnimator;\n\nimport com.example.android.common.activities.SampleActivityBase;\nimport com.example.android.common.logger.Log;\nimport com.example.android.common.logger.LogFragment;\nimport com.example.android.common.logger.LogWrapper;\nimport com.example.android.common.logger.MessageOnlyLogFilter;\n\n/**\n * A simple launcher activity containing a summary sample description, sample log and a custom\n * {@link android.support.v4.app.Fragment} which can display a view.\n * <p>\n * For devices with displays with a width of 720dp or greater, the sample log is always visible,\n * on other devices it's visibility is controlled by an item on the Action Bar.\n */\npublic class MainActivity extends SampleActivityBase {\n\n    public static final String TAG = \"MainActivity\";\n\n    // Whether the Log Fragment is currently shown\n    private boolean mLogShown;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        if (savedInstanceState == null) {\n            FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n            SlidingTabsBasicFragment fragment = new SlidingTabsBasicFragment();\n            transaction.replace(R.id.sample_content_fragment, fragment);\n            transaction.commit();\n        }\n    }\n\n    @Override\n    public boolean onCreateOptionsMenu(Menu menu) {\n        getMenuInflater().inflate(R.menu.main, menu);\n        return true;\n    }\n\n    @Override\n    public boolean onPrepareOptionsMenu(Menu menu) {\n        MenuItem logToggle = menu.findItem(R.id.menu_toggle_log);\n        logToggle.setVisible(findViewById(R.id.sample_output) instanceof ViewAnimator);\n        logToggle.setTitle(mLogShown ? R.string.sample_hide_log : R.string.sample_show_log);\n\n        return super.onPrepareOptionsMenu(menu);\n    }\n\n    @Override\n    public boolean onOptionsItemSelected(MenuItem item) {\n        switch(item.getItemId()) {\n            case R.id.menu_toggle_log:\n                mLogShown = !mLogShown;\n                ViewAnimator output = (ViewAnimator) findViewById(R.id.sample_output);\n                if (mLogShown) {\n                    output.setDisplayedChild(1);\n                } else {\n                    output.setDisplayedChild(0);\n                }\n                supportInvalidateOptionsMenu();\n                return true;\n        }\n        return super.onOptionsItemSelected(item);\n    }\n\n    /** Create a chain of targets that will receive log data */\n    @Override\n    public void initializeLogging() {\n        // Wraps Android's native log framework.\n        LogWrapper logWrapper = new LogWrapper();\n        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.\n        Log.setLogNode(logWrapper);\n\n        // Filter strips out everything except the message text.\n        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();\n        logWrapper.setNext(msgFilter);\n\n        // On screen logging via a fragment with a TextView.\n        LogFragment logFragment = (LogFragment) getSupportFragmentManager()\n                .findFragmentById(R.id.log_fragment);\n        msgFilter.setNext(logFragment.getLogView());\n\n        Log.i(TAG, \"Ready\");\n    }\n}\n"
  },
  {
    "path": "Application/src/main/java/com/example/android/slidingtabsbasic/SlidingTabsBasicFragment.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.example.android.slidingtabsbasic;\n\nimport com.example.android.common.logger.Log;\nimport com.example.android.common.view.SlidingTabLayout;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.view.PagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\n\n/**\n * A basic sample which shows how to use {@link com.example.android.common.view.SlidingTabLayout}\n * to display a custom {@link ViewPager} title strip which gives continuous feedback to the user\n * when scrolling.\n */\npublic class SlidingTabsBasicFragment extends Fragment {\n\n    static final String LOG_TAG = \"SlidingTabsBasicFragment\";\n\n    /**\n     * A custom {@link ViewPager} title strip which looks much like Tabs present in Android v4.0 and\n     * above, but is designed to give continuous feedback to the user when scrolling.\n     */\n    private SlidingTabLayout mSlidingTabLayout;\n\n    /**\n     * A {@link ViewPager} which will be used in conjunction with the {@link SlidingTabLayout} above.\n     */\n    private ViewPager mViewPager;\n\n    /**\n     * Inflates the {@link View} which will be displayed by this {@link Fragment}, from the app's\n     * resources.\n     */\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\n            Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.fragment_sample, container, false);\n    }\n\n    // BEGIN_INCLUDE (fragment_onviewcreated)\n    /**\n     * This is called after the {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)} has finished.\n     * Here we can pick out the {@link View}s we need to configure from the content view.\n     *\n     * We set the {@link ViewPager}'s adapter to be an instance of {@link SamplePagerAdapter}. The\n     * {@link SlidingTabLayout} is then given the {@link ViewPager} so that it can populate itself.\n     *\n     * @param view View created in {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}\n     */\n    @Override\n    public void onViewCreated(View view, Bundle savedInstanceState) {\n        // BEGIN_INCLUDE (setup_viewpager)\n        // Get the ViewPager and set it's PagerAdapter so that it can display items\n        mViewPager = (ViewPager) view.findViewById(R.id.viewpager);\n        mViewPager.setAdapter(new SamplePagerAdapter());\n        // END_INCLUDE (setup_viewpager)\n\n        // BEGIN_INCLUDE (setup_slidingtablayout)\n        // Give the SlidingTabLayout the ViewPager, this must be done AFTER the ViewPager has had\n        // it's PagerAdapter set.\n        mSlidingTabLayout = (SlidingTabLayout) view.findViewById(R.id.sliding_tabs);\n        mSlidingTabLayout.setViewPager(mViewPager);\n        // END_INCLUDE (setup_slidingtablayout)\n    }\n    // END_INCLUDE (fragment_onviewcreated)\n\n    /**\n     * The {@link android.support.v4.view.PagerAdapter} used to display pages in this sample.\n     * The individual pages are simple and just display two lines of text. The important section of\n     * this class is the {@link #getPageTitle(int)} method which controls what is displayed in the\n     * {@link SlidingTabLayout}.\n     */\n    class SamplePagerAdapter extends PagerAdapter {\n\n        /**\n         * @return the number of pages to display\n         */\n        @Override\n        public int getCount() {\n            return 10;\n        }\n\n        /**\n         * @return true if the value returned from {@link #instantiateItem(ViewGroup, int)} is the\n         * same object as the {@link View} added to the {@link ViewPager}.\n         */\n        @Override\n        public boolean isViewFromObject(View view, Object o) {\n            return o == view;\n        }\n\n        // BEGIN_INCLUDE (pageradapter_getpagetitle)\n        /**\n         * Return the title of the item at {@code position}. This is important as what this method\n         * returns is what is displayed in the {@link SlidingTabLayout}.\n         * <p>\n         * Here we construct one using the position value, but for real application the title should\n         * refer to the item's contents.\n         */\n        @Override\n        public CharSequence getPageTitle(int position) {\n            return \"Item \" + (position + 1);\n        }\n        // END_INCLUDE (pageradapter_getpagetitle)\n\n        /**\n         * Instantiate the {@link View} which should be displayed at {@code position}. Here we\n         * inflate a layout from the apps resources and then change the text view to signify the position.\n         */\n        @Override\n        public Object instantiateItem(ViewGroup container, int position) {\n            // Inflate a new layout from our resources\n            View view = getActivity().getLayoutInflater().inflate(R.layout.pager_item,\n                    container, false);\n            // Add the newly created View to the ViewPager\n            container.addView(view);\n\n            // Retrieve a TextView from the inflated View, and update it's text\n            TextView title = (TextView) view.findViewById(R.id.item_title);\n            title.setText(String.valueOf(position + 1));\n\n            Log.i(LOG_TAG, \"instantiateItem() [position: \" + position + \"]\");\n\n            // Return the View\n            return view;\n        }\n\n        /**\n         * Destroy the item from the {@link ViewPager}. In our case this is simply removing the\n         * {@link View}.\n         */\n        @Override\n        public void destroyItem(ViewGroup container, int position, Object object) {\n            container.removeView((View) object);\n            Log.i(LOG_TAG, \"destroyItem() [position: \" + position + \"]\");\n        }\n\n    }\n}\n"
  },
  {
    "path": "Application/src/main/res/layout/activity_main.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n<LinearLayout\n      xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      android:orientation=\"vertical\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      android:id=\"@+id/sample_main_layout\">\n\n    <ViewAnimator\n          android:id=\"@+id/sample_output\"\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"0px\"\n          android:layout_weight=\"1\">\n\n        <ScrollView\n              style=\"@style/Widget.SampleMessageTile\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\">\n\n            <TextView\n                  style=\"@style/Widget.SampleMessage\"\n                  android:layout_width=\"match_parent\"\n                  android:layout_height=\"wrap_content\"\n                  android:paddingLeft=\"@dimen/horizontal_page_margin\"\n                  android:paddingRight=\"@dimen/horizontal_page_margin\"\n                  android:paddingTop=\"@dimen/vertical_page_margin\"\n                  android:paddingBottom=\"@dimen/vertical_page_margin\"\n                  android:text=\"@string/intro_message\" />\n        </ScrollView>\n\n        <fragment\n              android:name=\"com.example.android.common.logger.LogFragment\"\n              android:id=\"@+id/log_fragment\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\" />\n\n    </ViewAnimator>\n\n    <View\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"1dp\"\n          android:background=\"@android:color/darker_gray\" />\n\n    <FrameLayout\n          android:id=\"@+id/sample_content_fragment\"\n          android:layout_weight=\"2\"\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"0px\" />\n\n</LinearLayout>\n\n"
  },
  {
    "path": "Application/src/main/res/layout/fragment_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      android:orientation=\"vertical\">\n\n    <com.example.android.common.view.SlidingTabLayout\n          android:id=\"@+id/sliding_tabs\"\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"wrap_content\" />\n\n    <android.support.v4.view.ViewPager\n          android:id=\"@+id/viewpager\"\n          android:layout_width=\"match_parent\"\n          android:layout_height=\"0px\"\n          android:layout_weight=\"1\"\n          android:background=\"@android:color/white\"/>\n\n</LinearLayout>"
  },
  {
    "path": "Application/src/main/res/layout/pager_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      android:orientation=\"vertical\"\n      android:gravity=\"center\">\n\n    <TextView\n          android:id=\"@+id/item_subtitle\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:textAppearance=\"?android:attr/textAppearanceLarge\"\n          android:text=\"Page:\"/>\n\n    <TextView\n          android:id=\"@+id/item_title\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:textSize=\"80sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "Application/src/main/res/layout-w720dp/activity_main.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n<LinearLayout\n      xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      android:orientation=\"horizontal\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      android:id=\"@+id/sample_main_layout\">\n\n    <LinearLayout\n          android:id=\"@+id/sample_output\"\n          android:layout_width=\"0px\"\n          android:layout_height=\"match_parent\"\n          android:layout_weight=\"1\"\n          android:orientation=\"vertical\">\n\n        <FrameLayout\n              style=\"@style/Widget.SampleMessageTile\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"wrap_content\">\n\n            <TextView\n                  style=\"@style/Widget.SampleMessage\"\n                  android:layout_width=\"match_parent\"\n                  android:layout_height=\"wrap_content\"\n                  android:paddingLeft=\"@dimen/margin_medium\"\n                  android:paddingRight=\"@dimen/margin_medium\"\n                  android:paddingTop=\"@dimen/margin_large\"\n                  android:paddingBottom=\"@dimen/margin_large\"\n                  android:text=\"@string/intro_message\" />\n        </FrameLayout>\n\n        <View\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"1dp\"\n              android:background=\"@android:color/darker_gray\" />\n\n        <fragment\n              android:name=\"com.example.android.common.logger.LogFragment\"\n              android:id=\"@+id/log_fragment\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"0px\"\n              android:layout_weight=\"1\" />\n\n    </LinearLayout>\n\n    <View\n          android:layout_width=\"1dp\"\n          android:layout_height=\"match_parent\"\n          android:background=\"@android:color/darker_gray\" />\n\n    <FrameLayout\n          android:id=\"@+id/sample_content_fragment\"\n          android:layout_weight=\"2\"\n          android:layout_width=\"0px\"\n          android:layout_height=\"match_parent\" />\n\n</LinearLayout>\n\n\n"
  },
  {
    "path": "Application/src/main/res/menu/main.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      xmlns:tools=\"http://schemas.android.com/tools\"\n      tools:ignore=\"AppCompatResource\">\n    <item android:id=\"@+id/menu_toggle_log\"\n          android:showAsAction=\"always\"\n          android:title=\"@string/sample_show_log\" />\n</menu>\n"
  },
  {
    "path": "Application/src/main/res/values/base-strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n<resources>\n    <string name=\"app_name\">SlidingTabsBasic</string>\n    <string name=\"intro_message\">\n        <![CDATA[\n        \n            \n            A basic sample which shows how to use SlidingTabLayout to display a custom\n            ViewPager title strip which gives continuous feedback to the user when scrolling.\n            \n        \n        ]]>\n    </string>\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values/fragmentview_strings.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n<resources>\n    <string name=\"sample_show_log\">Show Log</string>\n    <string name=\"sample_hide_log\">Hide Log</string>\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values/template-dimens.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<resources>\n\n    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->\n\n    <dimen name=\"margin_tiny\">4dp</dimen>\n    <dimen name=\"margin_small\">8dp</dimen>\n    <dimen name=\"margin_medium\">16dp</dimen>\n    <dimen name=\"margin_large\">32dp</dimen>\n    <dimen name=\"margin_huge\">64dp</dimen>\n\n    <!-- Semantic definitions -->\n\n    <dimen name=\"horizontal_page_margin\">@dimen/margin_medium</dimen>\n    <dimen name=\"vertical_page_margin\">@dimen/margin_medium</dimen>\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values/template-styles.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<resources>\n\n    <!-- Activity themes -->\n\n    <style name=\"Theme.Base\" parent=\"android:Theme.Light\" />\n\n    <style name=\"Theme.Sample\" parent=\"Theme.Base\" />\n\n    <style name=\"AppTheme\" parent=\"Theme.Sample\" />\n    <!-- Widget styling -->\n\n    <style name=\"Widget\" />\n\n    <style name=\"Widget.SampleMessage\">\n        <item name=\"android:textAppearance\">?android:textAppearanceMedium</item>\n        <item name=\"android:lineSpacingMultiplier\">1.1</item>\n    </style>\n\n    <style name=\"Widget.SampleMessageTile\">\n        <item name=\"android:background\">@drawable/tile</item>\n        <item name=\"android:shadowColor\">#7F000000</item>\n        <item name=\"android:shadowDy\">-3.5</item>\n        <item name=\"android:shadowRadius\">2</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values-sw600dp/template-dimens.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<resources>\n\n    <!-- Semantic definitions -->\n\n    <dimen name=\"horizontal_page_margin\">@dimen/margin_huge</dimen>\n    <dimen name=\"vertical_page_margin\">@dimen/margin_medium</dimen>\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values-sw600dp/template-styles.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<resources>\n\n    <style name=\"Widget.SampleMessage\">\n        <item name=\"android:textAppearance\">?android:textAppearanceLarge</item>\n        <item name=\"android:lineSpacingMultiplier\">1.2</item>\n        <item name=\"android:shadowDy\">-6.5</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values-v11/template-styles.xml",
    "content": "<!--\n  Copyright 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n\n<resources>\n\n    <!-- Activity themes -->\n    <style name=\"Theme.Base\" parent=\"android:Theme.Holo.Light\" />\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values-v21/base-colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n<resources>\n\n\n</resources>\n"
  },
  {
    "path": "Application/src/main/res/values-v21/base-template-styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n Copyright 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n<resources>\n\n    <!-- Activity themes -->\n    <style name=\"Theme.Base\" parent=\"android:Theme.Material.Light\">\n    </style>\n\n</resources>\n"
  },
  {
    "path": "Application/tests/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright (C) 2013 The Android Open Source Project\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n  -->\n<!-- package name must be unique so suffix with \"tests\" so package loader doesn't ignore us -->\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"com.example.android.slidingtabsbasic.tests\"\n          android:versionCode=\"1\"\n          android:versionName=\"1.0\">\n\n    <!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->\n\n    <!-- We add an application tag here just so that we can indicate that\n         this package needs to link against the android.test library,\n         which is needed when building test cases. -->\n    <application>\n        <uses-library android:name=\"android.test.runner\" />\n    </application>\n\n    <!--\n    Specifies the instrumentation test runner used to run the tests.\n    -->\n    <instrumentation\n            android:name=\"android.test.InstrumentationTestRunner\"\n            android:targetPackage=\"com.example.android.slidingtabsbasic\"\n            android:label=\"Tests for com.example.android.slidingtabsbasic\" />\n\n</manifest>\n"
  },
  {
    "path": "Application/tests/src/com/example/android/slidingtabsbasic/tests/SampleTests.java",
    "content": "/*\n* Copyright (C) 2013 The Android Open Source Project\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n*      http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\npackage com.example.android.slidingtabsbasic.tests;\n\nimport com.example.android.slidingtabsbasic.*;\n\nimport android.test.ActivityInstrumentationTestCase2;\n\n/**\n* Tests for SlidingTabsBasic sample.\n*/\npublic class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {\n\n    private MainActivity mTestActivity;\n    private SlidingTabsBasicFragment mTestFragment;\n\n    public SampleTests() {\n        super(MainActivity.class);\n    }\n\n    @Override\n    protected void setUp() throws Exception {\n        super.setUp();\n\n        // Starts the activity under test using the default Intent with:\n        // action = {@link Intent#ACTION_MAIN}\n        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}\n        // All other fields are null or empty.\n        mTestActivity = getActivity();\n        mTestFragment = (SlidingTabsBasicFragment)\n            mTestActivity.getSupportFragmentManager().getFragments().get(1);\n    }\n\n    /**\n    * Test if the test fixture has been set up correctly.\n    */\n    public void testPreconditions() {\n        //Try to add a message to add context to your assertions. These messages will be shown if\n        //a tests fails and make it easy to understand why a test failed\n        assertNotNull(\"mTestActivity is null\", mTestActivity);\n        assertNotNull(\"mTestFragment is null\", mTestFragment);\n    }\n\n    /**\n    * Add more tests below.\n    */\n\n}\n"
  },
  {
    "path": "CONTRIB.md",
    "content": "# How to become a contributor and submit your own code\n\n## Contributor License Agreements\n\nWe'd love to accept your sample apps and patches! Before we can take them, we\nhave to jump a couple of legal hurdles.\n\nPlease fill out either the individual or corporate Contributor License Agreement (CLA).\n\n  * If you are an individual writing original source code and you're sure you\n    own the intellectual property, then you'll need to sign an [individual CLA]\n    (https://developers.google.com/open-source/cla/individual).\n  * If you work for a company that wants to allow you to contribute your work,\n    then you'll need to sign a [corporate CLA]\n    (https://developers.google.com/open-source/cla/corporate).\n\nFollow either of the two links above to access the appropriate CLA and\ninstructions for how to sign and return it. Once we receive it, we'll be able to\naccept your pull requests.\n\n## Contributing A Patch\n\n1. Submit an issue describing your proposed change to the repo in question.\n1. The repo owner will respond to your issue promptly.\n1. If your proposed change is accepted, and you haven't already done so, sign a\n   Contributor License Agreement (see details above).\n1. Fork the desired repo, develop and test your code changes.\n1. Ensure that your code adheres to the existing style in the sample to which\n   you are contributing. Refer to the\n   [Android Code Style Guide]\n   (https://source.android.com/source/code-style.html) for the\n   recommended coding standards for this organization.\n1. Ensure that your code has an appropriate set of unit tests which all pass.\n1. Submit a pull request.\n\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# How to become a contributor and submit your own code\n\n## Contributor License Agreements\n\nWe'd love to accept your sample apps and patches! Before we can take them, we\nhave to jump a couple of legal hurdles.\n\nPlease fill out either the individual or corporate Contributor License Agreement (CLA).\n\n  * If you are an individual writing original source code and you're sure you\n    own the intellectual property, then you'll need to sign an [individual CLA]\n    (https://cla.developers.google.com).\n  * If you work for a company that wants to allow you to contribute your work,\n    then you'll need to sign a [corporate CLA]\n    (https://cla.developers.google.com).\n\nFollow either of the two links above to access the appropriate CLA and\ninstructions for how to sign and return it. Once we receive it, we'll be able to\naccept your pull requests.\n\n## Contributing A Patch\n\n1. Submit an issue describing your proposed change to the repo in question.\n1. The repo owner will respond to your issue promptly.\n1. If your proposed change is accepted, and you haven't already done so, sign a\n   Contributor License Agreement (see details above).\n1. Fork the desired repo, develop and test your code changes.\n1. Ensure that your code adheres to the existing style in the sample to which\n   you are contributing. Refer to the\n   [Android Code Style Guide]\n   (https://source.android.com/source/code-style.html) for the\n   recommended coding standards for this organization.\n1. Ensure that your code has an appropriate set of unit tests which all pass.\n1. Submit a pull request.\n\n"
  },
  {
    "path": "LICENSE",
    "content": "Apache License\n--------------\n\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "\nAndroid SlidingTabsBasic Sample\n===============================\n\nThis sample has been deprecated/archived meaning it's read-only and it's no longer actively maintained (more details on archiving can be found [here][1]).\n\nFor other related samples, check out the new [github.com/android/views-widgets-samples][2] repo. Thank you!\n\n[1]: https://help.github.com/en/articles/about-archiving-repositories\n[2]: https://github.com/android/views-widgets-samples\n"
  },
  {
    "path": "build.gradle",
    "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Feb 06 10:46:09 GMT 2014\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "packaging.yaml",
    "content": "# GOOGLE SAMPLE PACKAGING DATA\n#\n# This file is used by Google as part of our samples packaging process.\n# End users may safely ignore this file. It has no relevance to other systems.\n---\n\nstatus:       PUBLISHED\ntechnologies: [Android]\ncategories:   [UI]\nlanguages:    [Java]\nsolutions:    [Mobile]\ngithub:       googlesamples/android-SlidingTabsBasic\nlevel:        BEGINNER\nicon:         SlidingTabsBasicSample/src/main/res/drawable-xxhdpi/ic_launcher.png\nlicense:      apache2-android\n"
  },
  {
    "path": "settings.gradle",
    "content": "include 'Application'\n"
  }
]