[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n"
  },
  {
    "path": ".idea/.name",
    "content": "AndroidTabbedDialog"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <resourceExtensions />\n    <wildcardResourcePatterns>\n      <entry name=\"!?*.java\" />\n      <entry name=\"!?*.form\" />\n      <entry name=\"!?*.class\" />\n      <entry name=\"!?*.groovy\" />\n      <entry name=\"!?*.scala\" />\n      <entry name=\"!?*.flex\" />\n      <entry name=\"!?*.kt\" />\n      <entry name=\"!?*.clj\" />\n      <entry name=\"!?*.aj\" />\n    </wildcardResourcePatterns>\n    <annotationProcessing>\n      <profile default=\"true\" name=\"Default\" enabled=\"false\">\n        <processorPath useClasspath=\"true\" />\n      </profile>\n    </annotationProcessing>\n  </component>\n</project>"
  },
  {
    "path": ".idea/copyright/profiles_settings.xml",
    "content": "<component name=\"CopyrightManager\">\n  <settings default=\"\" />\n</component>"
  },
  {
    "path": ".idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\">\n    <file url=\"PROJECT\" charset=\"UTF-8\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"gradleJvm\" value=\"1.8\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n            <option value=\"$PROJECT_DIR$/library\" />\n          </set>\n        </option>\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"EntryPointsManager\">\n    <entry_points version=\"2.0\" />\n  </component>\n  <component name=\"NullableNotNullManager\">\n    <option name=\"myDefaultNullable\" value=\"android.support.annotation.Nullable\" />\n    <option name=\"myDefaultNotNull\" value=\"android.support.annotation.NonNull\" />\n    <option name=\"myNullables\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.Nullable\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nullable\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.Nullable\" />\n        </list>\n      </value>\n    </option>\n    <option name=\"myNotNulls\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.NotNull\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nonnull\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.NonNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.NonNull\" />\n        </list>\n      </value>\n    </option>\n  </component>\n  <component name=\"ProjectLevelVcsManager\" settingsEditedManually=\"false\">\n    <OptionsSetting value=\"true\" id=\"Add\" />\n    <OptionsSetting value=\"true\" id=\"Remove\" />\n    <OptionsSetting value=\"true\" id=\"Checkout\" />\n    <OptionsSetting value=\"true\" id=\"Update\" />\n    <OptionsSetting value=\"true\" id=\"Status\" />\n    <OptionsSetting value=\"true\" id=\"Edit\" />\n    <ConfirmationsSetting value=\"0\" id=\"Add\" />\n    <ConfirmationsSetting value=\"0\" id=\"Remove\" />\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_7\" default=\"true\" assert-keyword=\"true\" jdk-15=\"true\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/AndroidTabbedDialog.iml\" filepath=\"$PROJECT_DIR$/AndroidTabbedDialog.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/app/app.iml\" filepath=\"$PROJECT_DIR$/app/app.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/library/library.iml\" filepath=\"$PROJECT_DIR$/library/library.iml\" />\n    </modules>\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"\" vcs=\"\" />\n  </component>\n</project>"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\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": "[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AndroidTabbedDialog-green.svg?style=true)](https://android-arsenal.com/details/1/3318)  <a href=\"https://opensource.org/licenses/Apache-2.0\" target=\"_blank\"><img src=\"https://img.shields.io/badge/License-Apache_v2.0-blue.svg?style=flat\"/></a> \n\n[![](https://jitpack.io/v/ashishbhandari/AndroidTabbedDialog.svg)](https://jitpack.io/#ashishbhandari/AndroidTabbedDialog)\n\n\n\n# AndroidTabbedDialog\n\n\n![](https://raw.githubusercontent.com/ashishbhandari/AndroidTabbedDialog/master/screenshots/test.gif)\n\n## Setup\nAdd jitpack to your project’s repositories.\n\n```\nrepositories {\n        // ...\n        maven { url \"https://jitpack.io\" }\n    }\n```\n\nThen add Tabbed dialog to your Module’s dependencies\n\n```\ndependencies {\n\t         compile 'com.github.ashishbhandari:AndroidTabbedDialog:v1.1'\n\t}\n```\n\n\n## How to create tab dialogs:\n\n```java\nTabDialogFragment.createBuilder(MainActivity.this, getSupportFragmentManager())\n                        .setTitle(\"hello\")\n                        .setSubTitle(\"subtitle\")\n                        .setTabButtonText(new CharSequence[]{\"Tab1\", \"Tab2\"})\n                        .setPositiveButtonText(\"Love\")\n                        .setNegativeButtonText(\"Hate\")\n                        .setNeutralButtonText(\"WTF?\")\n                        .setRequestCode(REQUEST_SIMPLE_DIALOG)\n                        .show();\n```\n\n### How to react on button press in your Activity/Fragment:\nSimply implement interface `ISimpleDialogListener` in your Activity/Fragment. Listener's callbacks have `requestCode` parameter - you can use it if you have more dialogs in one Activity/Fragment.\n\n### How to render tab view inside your dialog:\nSimply implement interface `IFragmentListener` in your Activity/Fragment. Listener's callbacks have:-\n\n`onFragmentViewCreated(Fragment fragment)`\n`onFragmentAttached(Fragment fragment)`\n`onFragmentDetached(Fragment fragment)`\n\n```java\n    @Override\n    public void onFragmentViewCreated(Fragment fragment) {\n        int selectedTabPosition = fragment.getArguments().getInt(PageFragment.ARG_DAY_INDEX, 0);\n        View rootContainer = fragment.getView().findViewById(R.id.root_container);\n        Log.i(TAG, \"Position: \" + selectedTabPosition);\n\n        switch (selectedTabPosition) {\n            case 0:\n                // add view in container for first tab\n                View tabProductDetailLayout = getLayoutInflater().inflate(R.layout.tab_one_layout, (ViewGroup) rootContainer);\n\n                TextView textView = (TextView) tabProductDetailLayout.findViewById(R.id.text_view);\n                textView.setText(\"hello: tab1\");\n                break;\n            case 1:\n                // add view in container for second tab\n                View tabProductDetailLayout2 = getLayoutInflater().inflate(R.layout.tab_one_layout, (ViewGroup) rootContainer);\n\n                TextView textView1 = (TextView) tabProductDetailLayout2.findViewById(R.id.text_view);\n                textView1.setText(\"hello: tab2\");\n                break;\n        }\n    }\n```\n\n## License\nCopyright (c) 2016 Ashish Bhandari\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nrepositories {\n    jcenter()\n    maven { url \"https://jitpack.io\" }\n}\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.2\"\n\n    defaultConfig {\n        applicationId \"com.androidifygeeks.tabdialogs\"\n        minSdkVersion 16\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(include: ['*.jar'], dir: 'libs')\n    testCompile 'junit:junit:4.12'\n    compile 'com.android.support:appcompat-v7:23.2.1'\n    //    compile 'com.github.ashishbhandari:AndroidTabbedDialog:1.0'\n    compile project(':library')\n}\n\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:\\AndroidStudioSDK/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "app/src/androidTest/java/com/androidifygeeks/tabdialogs/ApplicationTest.java",
    "content": "package com.androidifygeeks.tabdialogs;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.androidifygeeks.tabdialogs\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "app/src/main/java/com/androidifygeeks/tabdialogs/MainActivity.java",
    "content": "package com.androidifygeeks.tabdialogs;\n\nimport android.support.v4.app.Fragment;\nimport android.support.v7.app.AppCompatActivity;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport com.androidifygeeks.library.fragment.PageFragment;\nimport com.androidifygeeks.library.fragment.TabDialogFragment;\nimport com.androidifygeeks.library.iface.IFragmentListener;\nimport com.androidifygeeks.library.iface.ISimpleDialogCancelListener;\nimport com.androidifygeeks.library.iface.ISimpleDialogListener;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class MainActivity extends AppCompatActivity implements ISimpleDialogListener, ISimpleDialogCancelListener, IFragmentListener {\n\n    private static final int REQUEST_TABBED_DIALOG = 42;\n\n    private static final String TAG = MainActivity.class.getSimpleName();\n\n    private final Set<Fragment> mMyScheduleFragments = new HashSet<>();\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        findViewById(R.id.testbutton).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                TabDialogFragment.createBuilder(MainActivity.this, getSupportFragmentManager())\n                        .setTitle(\"Title\")\n                        .setSubTitle(\"Subtitle\")\n                        .setTabButtonText(new CharSequence[]{\"Tab1\", \"Tab2\"})\n                        .setPositiveButtonText(\"Ok\")\n                        .setNegativeButtonText(\"Cancel\")\n                        .setNeutralButtonText(\"Neutral\")\n                        .setRequestCode(REQUEST_TABBED_DIALOG)\n                        .show();\n            }\n        });\n    }\n\n\n    @Override\n    public void onCancelled(int requestCode) {\n        switch (requestCode) {\n            case REQUEST_TABBED_DIALOG:\n                Toast.makeText(MainActivity.this, \"Dialog cancelled\", Toast.LENGTH_SHORT).show();\n                break;\n            default:\n                break;\n        }\n    }\n\n    @Override\n    public void onNegativeButtonClicked(int requestCode) {\n        if (requestCode == REQUEST_TABBED_DIALOG) {\n            Toast.makeText(MainActivity.this, \"Negative button clicked\", Toast.LENGTH_SHORT).show();\n        }\n    }\n\n    @Override\n    public void onNeutralButtonClicked(int requestCode) {\n        if (requestCode == REQUEST_TABBED_DIALOG) {\n            Toast.makeText(MainActivity.this, \"Neutral button clicked\", Toast.LENGTH_SHORT).show();\n        }\n    }\n\n    @Override\n    public void onPositiveButtonClicked(int requestCode) {\n        if (requestCode == REQUEST_TABBED_DIALOG) {\n            Toast.makeText(MainActivity.this, \"Positive button clicked\", Toast.LENGTH_SHORT).show();\n        }\n    }\n\n    @Override\n    public void onFragmentViewCreated(Fragment fragment) {\n        int selectedTabPosition = fragment.getArguments().getInt(PageFragment.ARG_DAY_INDEX, 0);\n        View rootContainer = fragment.getView().findViewById(R.id.root_container);\n        Log.i(TAG, \"Position: \" + selectedTabPosition);\n\n        switch (selectedTabPosition) {\n            case 0:\n                selectedTabPositionZeroCase(rootContainer);\n                break;\n            case 1:\n                selectedTabPositionOneCase(rootContainer);\n                break;\n            default:\n                break;\n        }\n\n\n    }\n\n    private void selectedTabPositionZeroCase(View rootContainer) {\n        // add view in container for first tab\n        View tabProductDetailLayout = getLayoutInflater().inflate(R.layout.tab_one_layout, (ViewGroup) rootContainer);\n\n        TextView textView = (TextView) tabProductDetailLayout.findViewById(R.id.text_view);\n        textView.setText(\"hello: tab1\");\n    }\n\n    private void selectedTabPositionOneCase(View rootContainer) {\n        // add view in container for second tab\n        View tabProductDetailLayout2 = getLayoutInflater().inflate(R.layout.tab_one_layout, (ViewGroup) rootContainer);\n\n        TextView textView1 = (TextView) tabProductDetailLayout2.findViewById(R.id.text_view);\n        textView1.setText(\"hello: tab2\");\n    }\n\n    @Override\n    public void onFragmentAttached(Fragment fragment) {\n        mMyScheduleFragments.add(fragment);\n    }\n\n    @Override\n    public void onFragmentDetached(Fragment fragment) {\n        mMyScheduleFragments.remove(fragment);\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    tools:context=\"com.androidifygeeks.tabdialogs.MainActivity\">\n\n    <Button\n        android:id=\"@+id/testbutton\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:text=\"Dialog with tabs\" />\n</RelativeLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/tab_one_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/scrollView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:fillViewport=\"true\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        android:gravity=\"center\">\n\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textAppearance=\"?android:attr/textAppearanceSmall\"\n            android:text=\"Small Text\"\n            android:id=\"@+id/text_view\" />\n    </LinearLayout>\n</ScrollView>\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Tabbed Dialogs</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/test/java/com/androidifygeeks/tabdialogs/ExampleUnitTest.java",
    "content": "package com.androidifygeeks.tabdialogs;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.5.0'\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' // Add this line\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Oct 21 11:34:03 PDT 2015\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.8-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true"
  },
  {
    "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# 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\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\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    JAVACMD=`cygpath --unix \"$JAVACMD\"`\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\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\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%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "library/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "library/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'com.github.dcendents.android-maven'\n\ngroup='com.github.ashishbhandari'\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.2\"\n\n    defaultConfig {\n        minSdkVersion 16\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.1\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    testCompile 'junit:junit:4.12'\n\n    compile 'com.android.support:appcompat-v7:23.2.1'\n    compile 'com.android.support:design:23.2.1'\n}\n\n// build a jar with source files\ntask sourcesJar(type: Jar) {\n    from android.sourceSets.main.java.srcDirs\n    classifier = 'sources'\n}\n\ntask javadoc(type: Javadoc) {\n    failOnError false\n    source = android.sourceSets.main.java.sourceFiles\n    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))\n}\n\n// build a jar with javadoc\ntask javadocJar(type: Jar, dependsOn: javadoc) {\n    classifier = 'javadoc'\n    from javadoc.destinationDir\n}\n\nartifacts {\n    archives sourcesJar\n    archives javadocJar\n}\n\n"
  },
  {
    "path": "library/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:\\AndroidStudioSDK/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "library/src/androidTest/java/com/androidifygeeks/library/ApplicationTest.java",
    "content": "package com.androidifygeeks.library;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "library/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.androidifygeeks.library\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\">\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/core/BaseDialogBuilder.java",
    "content": "package com.androidifygeeks.library.core;\n\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.support.v4.app.DialogFragment;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\n\n/**\n * Internal base builder that holds common values for all dialog fragment builders.\n * <p/>\n * Created by b_ashish on 21-Mar-16.\n */\npublic abstract class BaseDialogBuilder<T extends BaseDialogBuilder<T>> {\n\n    protected final Context mContext;\n    protected final FragmentManager mFragmentManager;\n    protected final Class<? extends BaseDialogFragment> mClass;\n\n\n    public final static String ARG_REQUEST_CODE = \"request_code\";\n    public final static String ARG_CANCELABLE_ON_TOUCH_OUTSIDE = \"cancelable_oto\";\n    public final static String DEFAULT_TAG = \"simple_dialog\";\n    private String mTag = DEFAULT_TAG;\n    public final static int DEFAULT_REQUEST_CODE = -42;\n    private int mRequestCode = DEFAULT_REQUEST_CODE;\n    public static String ARG_USE_DARK_THEME = \"usedarktheme\";\n    public static String ARG_USE_LIGHT_THEME = \"uselighttheme\";\n\n    private Fragment mTargetFragment;\n    private boolean mCancelable = true;\n    private boolean mCancelableOnTouchOutside = true;\n    private boolean mUseDarkTheme = false;\n    private boolean mUseLightTheme = false;\n\n\n    public BaseDialogBuilder(Context context, FragmentManager fragmentManager, Class<? extends BaseDialogFragment> clazz) {\n        mFragmentManager = fragmentManager;\n        mContext = context.getApplicationContext();\n        mClass = clazz;\n    }\n\n    protected abstract T self();\n\n    protected abstract Bundle prepareArguments();\n\n    public T setCancelable(boolean cancelable) {\n        mCancelable = cancelable;\n        return self();\n    }\n\n    public T setCancelableOnTouchOutside(boolean cancelable) {\n        mCancelableOnTouchOutside = cancelable;\n        if (cancelable) {\n            mCancelable = cancelable;\n        }\n        return self();\n    }\n\n    public T setTargetFragment(Fragment fragment, int requestCode) {\n        mTargetFragment = fragment;\n        mRequestCode = requestCode;\n        return self();\n    }\n\n    public T setRequestCode(int requestCode) {\n        mRequestCode = requestCode;\n        return self();\n    }\n\n    public T setTag(String tag) {\n        mTag = tag;\n        return self();\n    }\n\n    public T useDarkTheme() {\n        mUseDarkTheme = true;\n        return self();\n    }\n\n    public T useLightTheme() {\n        mUseLightTheme = true;\n        return self();\n    }\n\n    private BaseDialogFragment create() {\n        final Bundle args = prepareArguments();\n\n        final BaseDialogFragment fragment = (BaseDialogFragment) Fragment.instantiate(mContext, mClass.getName(), args);\n\n        args.putBoolean(ARG_CANCELABLE_ON_TOUCH_OUTSIDE, mCancelableOnTouchOutside);\n\n        args.putBoolean(ARG_USE_DARK_THEME, mUseDarkTheme);\n\n        args.putBoolean(ARG_USE_LIGHT_THEME, mUseLightTheme);\n\n        if (mTargetFragment != null) {\n            fragment.setTargetFragment(mTargetFragment, mRequestCode);\n        } else {\n            args.putInt(ARG_REQUEST_CODE, mRequestCode);\n        }\n        fragment.setCancelable(mCancelable);\n        return fragment;\n    }\n\n    public DialogFragment show() {\n        BaseDialogFragment fragment = create();\n        fragment.show(mFragmentManager, mTag);\n        return fragment;\n    }\n\n    /**\n     * Like show() but allows the commit to be executed after an activity's state is saved. This\n     * is dangerous because the commit can be lost if the activity needs to later be restored from\n     * its state, so this should only be used for cases where it is okay for the UI state to change\n     * unexpectedly on the user.\n     */\n    public DialogFragment showAllowingStateLoss() {\n        BaseDialogFragment fragment = create();\n        fragment.showAllowingStateLoss(mFragmentManager, mTag);\n        return fragment;\n    }\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/core/BaseDialogFragment.java",
    "content": "package com.androidifygeeks.library.core;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.graphics.Typeface;\nimport android.os.Bundle;\nimport android.support.annotation.NonNull;\nimport android.support.design.widget.TabLayout;\nimport android.support.v4.app.DialogFragment;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentPagerAdapter;\nimport android.support.v4.app.FragmentTransaction;\nimport android.support.v4.view.ViewPager;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.Window;\nimport android.widget.AbsListView;\nimport android.widget.AdapterView;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.ListAdapter;\nimport android.widget.TextView;\n\nimport com.androidifygeeks.library.R;\nimport com.androidifygeeks.library.fragment.PageFragment;\nimport com.androidifygeeks.library.iface.ISimpleDialogCancelListener;\nimport com.androidifygeeks.library.util.MultiSwipeRefreshLayout;\nimport com.androidifygeeks.library.util.TypefaceHelper;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\n/**\n * Base dialog fragment for all your dialogs, styleable and same design on Android 2.2+.\n * <p/>\n *\n * @author David Vávra (david@inmite.eu)\n *         <p/>\n *         modified by b_ashish on 21-Mar-16.\n */\npublic abstract class BaseDialogFragment extends DialogFragment implements DialogInterface.OnShowListener, MultiSwipeRefreshLayout.CanChildScrollUpCallback {\n\n\n    private static final String TAG = BaseDialogFragment.class.getSimpleName();\n    protected int mRequestCode;\n\n    @NonNull\n    @Override\n    public Dialog onCreateDialog(Bundle savedInstanceState) {\n        Dialog dialog = new Dialog(getActivity());\n\n        Bundle args = getArguments();\n        if (args != null) {\n            dialog.setCanceledOnTouchOutside(\n                    args.getBoolean(BaseDialogBuilder.ARG_CANCELABLE_ON_TOUCH_OUTSIDE));\n        }\n        /*\n        * disable the actual title of a dialog cause custom dialog title is rendering through custom layout\n         */\n        dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n        dialog.setOnShowListener(this);\n        return dialog;\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                             Bundle savedInstanceState) {\n        Builder builder = new Builder(getActivity(), inflater, container);\n        return build(builder).create();\n    }\n\n    @Override\n    public void onActivityCreated(Bundle savedInstanceState) {\n        super.onActivityCreated(savedInstanceState);\n        final Fragment targetFragment = getTargetFragment();\n        if (targetFragment != null) {\n            mRequestCode = getTargetRequestCode();\n        } else {\n            Bundle args = getArguments();\n            if (args != null) {\n                mRequestCode = args.getInt(BaseDialogBuilder.ARG_REQUEST_CODE, 0);\n            }\n        }\n    }\n\n    /**\n     * Key method for using { com.avast.android.dialogs.core.BaseDialogFragment}.\n     * Customized dialogs need to be set up via provided builder.\n     *\n     * @param initialBuilder Provided builder for setting up customized dialog\n     * @return Updated builder\n     */\n    protected abstract Builder build(Builder initialBuilder);\n\n    @Override\n    public void onDestroyView() {\n        // bug in the compatibility library\n        if (getDialog() != null && getRetainInstance()) {\n            getDialog().setDismissMessage(null);\n        }\n        super.onDestroyView();\n    }\n\n    public void showAllowingStateLoss(FragmentManager manager, String tag) {\n        FragmentTransaction ft = manager.beginTransaction();\n        ft.add(this, tag);\n        ft.commitAllowingStateLoss();\n    }\n\n    @Override\n    public void onShow(DialogInterface dialog) {\n        if (getView() != null) {\n//            ScrollView vMessageScrollView = (ScrollView) getView().findViewById(R.id.sdl_message_scrollview);\n//            ListView vListView = (ListView) getView().findViewById(R.id.sdl_list);\n//            FrameLayout vCustomViewNoScrollView = (FrameLayout) getView().findViewById(R.id.sdl_custom);\n//            boolean customViewNoScrollViewScrollable = false;\n//            if (vCustomViewNoScrollView.getChildCount() > 0) {\n//                View firstChild = vCustomViewNoScrollView.getChildAt(0);\n//                if (firstChild instanceof ViewGroup) {\n//                    customViewNoScrollViewScrollable = isScrollable((ViewGroup) firstChild);\n//                }\n//            }\n//            boolean listViewScrollable = isScrollable(vListView);\n//            boolean messageScrollable = isScrollable(vMessageScrollView);\n//            boolean scrollable = listViewScrollable || messageScrollable || customViewNoScrollViewScrollable;\n//            modifyButtonsBasedOnScrollableContent(scrollable);\n        }\n    }\n\n    @Override\n    public void onCancel(DialogInterface dialog) {\n        super.onCancel(dialog);\n        for (ISimpleDialogCancelListener listener : getCancelListeners()) {\n            listener.onCancelled(mRequestCode);\n        }\n    }\n\n    /**\n     * Get dialog cancel listeners.\n     * There might be more than one cancel listener.\n     *\n     * @return Dialog cancel listeners\n     * @since 2.1.0\n     */\n    protected List<ISimpleDialogCancelListener> getCancelListeners() {\n        return getDialogListeners(ISimpleDialogCancelListener.class);\n    }\n\n    /**\n     * Utility method for acquiring all listeners of some type for current instance of DialogFragment\n     *\n     * @param listenerInterface Interface of the desired listeners\n     * @return Unmodifiable list of listeners\n     * @since 2.1.0\n     */\n    @SuppressWarnings(\"unchecked\")\n    protected <T> List<T> getDialogListeners(Class<T> listenerInterface) {\n        final Fragment targetFragment = getTargetFragment();\n        List<T> listeners = new ArrayList<T>(2);\n        if (targetFragment != null && listenerInterface.isAssignableFrom(targetFragment.getClass())) {\n            listeners.add((T) targetFragment);\n        }\n        if (getActivity() != null && listenerInterface.isAssignableFrom(getActivity().getClass())) {\n            listeners.add((T) getActivity());\n        }\n        return Collections.unmodifiableList(listeners);\n    }\n\n    private boolean isScrollable(ViewGroup listView) {\n        int totalHeight = 0;\n        for (int i = 0; i < listView.getChildCount(); i++) {\n            totalHeight += listView.getChildAt(i).getMeasuredHeight();\n        }\n        return listView.getMeasuredHeight() < totalHeight;\n    }\n\n    @Override\n    public boolean canSwipeRefreshChildScrollUp() {\n        return false;\n    }\n\n\n    /**\n     * Custom dialog builder\n     */\n    protected static class Builder {\n\n        private final Context mContext;\n\n        private final ViewGroup mContainer;\n\n        private final LayoutInflater mInflater;\n\n        private CharSequence mTitle = null;\n\n        private CharSequence mSubTitle = null;\n\n        private CharSequence mPositiveButtonText;\n\n        private View.OnClickListener mPositiveButtonListener;\n\n        private CharSequence mNegativeButtonText;\n\n        private View.OnClickListener mNegativeButtonListener;\n\n        private CharSequence mNeutralButtonText;\n\n        private View.OnClickListener mNeutralButtonListener;\n\n        private CharSequence mMessage;\n\n        private View mCustomView;\n\n        private ListAdapter mListAdapter;\n\n        private TabViewPagerAdapter mTabAdapter;\n\n        private CharSequence[] mTabItems;\n\n        private int mListCheckedItemIdx;\n\n        private int mChoiceMode;\n\n        private int[] mListCheckedItemMultipleIds;\n\n        private AdapterView.OnItemClickListener mOnItemClickListener;\n\n        private int contentHeight;\n\n        private int mViewPagerScrollState = ViewPager.SCROLL_STATE_IDLE;\n\n        private int baseTabViewId = 12345;\n\n\n        public Builder(Context context, LayoutInflater inflater, ViewGroup container) {\n            this.mContext = context;\n            this.mContainer = container;\n            this.mInflater = inflater;\n        }\n\n        public LayoutInflater getLayoutInflater() {\n            return mInflater;\n        }\n\n        public Builder setContentPaneHeight(int height) {\n            this.contentHeight = height;\n            return this;\n        }\n\n        public Builder setTitle(int titleId) {\n            this.mTitle = mContext.getText(titleId);\n            return this;\n        }\n\n        public Builder setTitle(CharSequence title) {\n            this.mTitle = title;\n            return this;\n        }\n\n        public Builder setSubTitle(int subTitleId) {\n            this.mSubTitle = mContext.getText(subTitleId);\n            return this;\n        }\n\n        public Builder setSubTitle(CharSequence subTitle) {\n            this.mSubTitle = subTitle;\n            return this;\n        }\n\n        public Builder setPositiveButton(int textId, final View.OnClickListener listener) {\n            mPositiveButtonText = mContext.getText(textId);\n            mPositiveButtonListener = listener;\n            return this;\n        }\n\n        public Builder setPositiveButton(CharSequence text, final View.OnClickListener listener) {\n            mPositiveButtonText = text;\n            mPositiveButtonListener = listener;\n            return this;\n        }\n\n        public Builder setNegativeButton(int textId, final View.OnClickListener listener) {\n            mNegativeButtonText = mContext.getText(textId);\n            mNegativeButtonListener = listener;\n            return this;\n        }\n\n        public Builder setNegativeButton(CharSequence text, final View.OnClickListener listener) {\n            mNegativeButtonText = text;\n            mNegativeButtonListener = listener;\n            return this;\n        }\n\n        public Builder setNeutralButton(int textId, final View.OnClickListener listener) {\n            mNeutralButtonText = mContext.getText(textId);\n            mNeutralButtonListener = listener;\n            return this;\n        }\n\n        public Builder setNeutralButton(CharSequence text, final View.OnClickListener listener) {\n            mNeutralButtonText = text;\n            mNeutralButtonListener = listener;\n            return this;\n        }\n\n        public Builder setMessage(int messageId) {\n            mMessage = mContext.getText(messageId);\n            return this;\n        }\n\n        public Builder setMessage(CharSequence message) {\n            mMessage = message;\n            return this;\n        }\n\n        public Builder setItems(ListAdapter listAdapter, int[] checkedItemIds, int choiceMode, final AdapterView.OnItemClickListener listener) {\n            mListAdapter = listAdapter;\n            mListCheckedItemMultipleIds = checkedItemIds;\n            mOnItemClickListener = listener;\n            mChoiceMode = choiceMode;\n            mListCheckedItemIdx = -1;\n            return this;\n        }\n\n        public Builder setTabItems(TabViewPagerAdapter tabAdapter, CharSequence[] tabItems) {\n            mTabAdapter = tabAdapter;\n            mTabItems = tabItems;\n            return this;\n        }\n\n        /**\n         * Set list\n         *\n         * @param checkedItemIdx Item check by default, -1 if no item should be checked\n         */\n        public Builder setItems(ListAdapter listAdapter, int checkedItemIdx,\n                                final AdapterView.OnItemClickListener listener) {\n            mListAdapter = listAdapter;\n            mOnItemClickListener = listener;\n            mListCheckedItemIdx = checkedItemIdx;\n            mChoiceMode = AbsListView.CHOICE_MODE_NONE;\n            return this;\n        }\n\n        public Builder setView(View view) {\n            mCustomView = view;\n            return this;\n        }\n\n        public View create() {\n\n            final LinearLayout content = (LinearLayout) mInflater.inflate(R.layout.tdl_dialog, mContainer, false);\n            TextView vTitle = (TextView) content.findViewById(R.id.tdl_title_text);\n            TextView vSubTitle = (TextView) content.findViewById(R.id.tdl_subtitle_text);\n\n            MultiSwipeRefreshLayout vMultiSwipeRefreshLayout = (MultiSwipeRefreshLayout) content.findViewById(R.id.tdl_swipe_refresh_layout);\n            setContentHeight(vMultiSwipeRefreshLayout);\n            final ViewPager vViewPager = (ViewPager) content.findViewById(R.id.tdl_view_pager);\n\n            final TabLayout vTabLayout = (TabLayout) content.findViewById(R.id.tdl_sliding_tabs);\n\n//            TextView vMessage = (TextView) content.findViewById(R.id.tdl_message);\n//            FrameLayout vCustomView = (FrameLayout) content.findViewById(R.id.sdl_custom);\n            Button vPositiveButton = (Button) content.findViewById(R.id.tdl_button_positive);\n            Button vNegativeButton = (Button) content.findViewById(R.id.tdl_button_negative);\n            Button vNeutralButton = (Button) content.findViewById(R.id.tdl_button_neutral);\n\n            Typeface regularFont = TypefaceHelper.get(mContext, \"Roboto-Regular\");\n            Typeface mediumFont = TypefaceHelper.get(mContext, \"Roboto-Medium\");\n\n            set(vTitle, mTitle, mediumFont);\n            set(vSubTitle, mSubTitle, mediumFont);\n//            set(vMessage, mMessage, regularFont);\n//            setPaddingOfTitleAndMessage(vTitle, vMessage);\n\n\n            //---- for tab rendering----//\n\n            if (mTabAdapter != null) {\n                vViewPager.setAdapter(mTabAdapter);\n                vTabLayout.setTabsFromPagerAdapter(mTabAdapter);\n                vTabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n                    @Override\n                    public void onTabSelected(TabLayout.Tab tab) {\n                        vViewPager.setCurrentItem(tab.getPosition(), true);\n                    }\n\n                    @Override\n                    public void onTabUnselected(TabLayout.Tab tab) {\n                    }\n\n                    @Override\n                    public void onTabReselected(TabLayout.Tab tab) {\n                        // Do nothing\n                    }\n                });\n                vViewPager.setPageMargin(mContext.getResources().getDimensionPixelSize(R.dimen.my_tab_view_page_margin));\n                vViewPager.setPageMarginDrawable(R.drawable.page_margin);\n                vViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n                    @Override\n                    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n                        mViewPagerScrollState = ViewPager.SCROLL_STATE_DRAGGING;\n                    }\n\n                    @Override\n                    public void onPageSelected(int position) {\n                        TabLayout.Tab tab = vTabLayout.getTabAt(position);\n                        tab.select();\n                    }\n\n                    @Override\n                    public void onPageScrollStateChanged(int state) {\n                        mViewPagerScrollState = ViewPager.SCROLL_STATE_IDLE;\n                    }\n                });\n\n                for (int i = 0, count = mTabItems.length; i < count; i++) {\n                    vTabLayout.setContentDescription(mTabItems[i]);\n                }\n                // help you to select default tab\n                TabLayout.Tab tab = vTabLayout.getTabAt(0);\n                tab.select();\n            }\n\n            //------end here--------//\n\n\n            set(vPositiveButton, mPositiveButtonText, mediumFont, mPositiveButtonListener);\n            set(vNegativeButton, mNegativeButtonText, mediumFont, mNegativeButtonListener);\n            set(vNeutralButton, mNeutralButtonText, mediumFont, mNeutralButtonListener);\n\n\n            return content;\n        }\n\n        /*\n        * defining the height of a content layout\n         */\n        private void setContentHeight(MultiSwipeRefreshLayout swipeRefreshLayout) {\n            if (swipeRefreshLayout != null) {\n                if (contentHeight <= 0) {\n                    swipeRefreshLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) mContext.getResources().getDimension(R.dimen.dialog_main_pane_height)));\n                } else {\n                    swipeRefreshLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, contentHeight));\n                }\n            }\n        }\n\n        /**\n         * Padding is different if there is only title, only message or both.\n         */\n        private void setPaddingOfTitleAndMessage(TextView vTitle, TextView vMessage) {\n//            int grid6 = mContext.getResources().getDimensionPixelSize(R.dimen.grid_6);\n//            int grid4 = mContext.getResources().getDimensionPixelSize(R.dimen.grid_4);\n//            if (!TextUtils.isEmpty(mTitle) && !TextUtils.isEmpty(mMessage)) {\n//                vTitle.setPadding(grid6, grid6, grid6, grid4);\n//                vMessage.setPadding(grid6, 0, grid6, grid4);\n//            } else if (TextUtils.isEmpty(mTitle)) {\n//                vMessage.setPadding(grid6, grid4, grid6, grid4);\n//            } else if (TextUtils.isEmpty(mMessage)) {\n//                vTitle.setPadding(grid6, grid6, grid6, grid4);\n//            }\n        }\n\n        private boolean shouldStackButtons() {\n            return shouldStackButton(mPositiveButtonText) || shouldStackButton(mNegativeButtonText)\n                    || shouldStackButton(mNeutralButtonText);\n        }\n\n        private boolean shouldStackButton(CharSequence text) {\n            final int MAX_BUTTON_CHARS = 12; // based on observation, could be done better with measuring widths\n            return text != null && text.length() > MAX_BUTTON_CHARS;\n        }\n\n        private void set(Button button, CharSequence text, Typeface font, View.OnClickListener listener) {\n            set(button, text, font);\n            if (listener != null) {\n                button.setOnClickListener(listener);\n            }\n        }\n\n        private void set(TextView textView, CharSequence text) {\n            if (text != null) {\n                textView.setText(text);\n            } else {\n                textView.setVisibility(View.GONE);\n            }\n        }\n\n        private void set(TextView textView, CharSequence text, Typeface font) {\n            if (text != null) {\n                textView.setText(text);\n                textView.setTypeface(font);\n            } else {\n                textView.setVisibility(View.GONE);\n            }\n        }\n    }\n\n    public class TabViewPagerAdapter extends FragmentPagerAdapter {\n\n        private final CharSequence[] tabItems;\n        private Fragment mCurrentFragment;\n\n        public TabViewPagerAdapter(FragmentManager fm, CharSequence[] tabItems) {\n            super(fm);\n            this.tabItems = tabItems;\n        }\n\n\n        public Fragment getCurrentFragment() {\n            return mCurrentFragment;\n        }\n\n        @Override\n        public void setPrimaryItem(ViewGroup container, int position, Object object) {\n            if (getCurrentFragment() != object) {\n                mCurrentFragment = ((Fragment) object);\n            }\n            super.setPrimaryItem(container, position, object);\n        }\n\n        @Override\n        public Fragment getItem(int position) {\n            Log.d(TAG, \"Creating fragment #\" + position);\n            PageFragment frag = new PageFragment();\n            Bundle args = new Bundle();\n            args.putInt(PageFragment.ARG_DAY_INDEX, position);\n            String parentTag = getTag();\n            args.putString(PageFragment.PARENT_TAG, parentTag);\n            frag.setArguments(args);\n            return frag;\n        }\n\n        @Override\n        public int getCount() {\n            return tabItems.length;\n        }\n\n        @Override\n        public CharSequence getPageTitle(int position) {\n            return tabItems[position];\n        }\n    }\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/fragment/PageFragment.java",
    "content": "package com.androidifygeeks.library.fragment;\n\nimport android.content.Context;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport com.androidifygeeks.library.R;\nimport com.androidifygeeks.library.iface.IFragmentListener;\n\n/**\n * Created by b_ashish on 17-Mar-16.\n * <p/>\n * this class can be invoke from activity or either from fragment\n */\npublic class PageFragment extends Fragment {\n\n    private String mContentDescription = null;\n    private View mRoot = null;\n\n    public static final String ARG_DAY_INDEX = \"com.androidifygeeks.library.ARG_DAY_INDEX\";\n    public static final String PARENT_TAG = \"com.androidifygeeks.library.PARENT_TAG\";\n\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        mRoot = inflater.inflate(R.layout.tdl_fragment_container, container, false);\n        if (mContentDescription != null) {\n            mRoot.setContentDescription(mContentDescription);\n        }\n        return mRoot;\n    }\n\n    public void setContentDescription(String desc) {\n        mContentDescription = desc;\n        if (mRoot != null) {\n            mRoot.setContentDescription(mContentDescription);\n        }\n    }\n\n    @Override\n    public void onViewCreated(View view, Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n\n        if (getActivity() instanceof IFragmentListener) {\n            ((IFragmentListener) getActivity()).onFragmentViewCreated(this);\n        } else {\n            Fragment parentFragment;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                parentFragment = getParentFragment();\n            } else {\n                // Collect the tag from the arguments\n                String tag = getArguments().getString(PARENT_TAG);\n                // Use the tag to get the parentFragment from the activity, which is (conveniently) available in onAttach()\n                parentFragment = getActivity().getSupportFragmentManager().findFragmentByTag(tag);\n            }\n\n            if (parentFragment instanceof IFragmentListener) {\n                ((IFragmentListener) parentFragment).onFragmentViewCreated(this);\n            }\n        }\n\n    }\n\n    @Override\n    public void onAttach(Context context) {\n        super.onAttach(context);\n        if (getActivity() instanceof IFragmentListener) {\n            ((IFragmentListener) getActivity()).onFragmentAttached(this);\n        } else {\n            Fragment parentFragment;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                parentFragment = getParentFragment();\n            } else {\n                // Collect the tag from the arguments\n                String tag = getArguments().getString(PARENT_TAG);\n                // Use the tag to get the parentFragment from the activity, which is (conveniently) available in onAttach()\n                parentFragment = getActivity().getSupportFragmentManager().findFragmentByTag(tag);\n            }\n\n            if (parentFragment instanceof IFragmentListener) {\n                ((IFragmentListener) parentFragment).onFragmentAttached(this);\n            }\n        }\n    }\n\n    @Override\n    public void onDetach() {\n        super.onDetach();\n        if (getActivity() instanceof IFragmentListener) {\n            ((IFragmentListener) getActivity()).onFragmentDetached(this);\n        } else {\n            Fragment parentFragment;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                parentFragment = getParentFragment();\n            } else {\n                // Collect the tag from the arguments\n                String tag = getArguments().getString(PARENT_TAG);\n                // Use the tag to get the parentFragment from the activity, which is (conveniently) available in onAttach()\n                parentFragment = getActivity().getSupportFragmentManager().findFragmentByTag(tag);\n            }\n\n            if (parentFragment instanceof IFragmentListener) {\n                ((IFragmentListener) parentFragment).onFragmentDetached(this);\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/fragment/TabDialogFragment.java",
    "content": "package com.androidifygeeks.library.fragment;\n\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentManager;\nimport android.text.Html;\nimport android.text.SpannedString;\nimport android.text.TextUtils;\nimport android.view.View;\n\nimport com.androidifygeeks.library.core.BaseDialogBuilder;\nimport com.androidifygeeks.library.core.BaseDialogFragment;\nimport com.androidifygeeks.library.iface.INegativeButtonDialogListener;\nimport com.androidifygeeks.library.iface.INeutralButtonDialogListener;\nimport com.androidifygeeks.library.iface.IPositiveButtonDialogListener;\n\nimport java.util.List;\n\n/**\n * Created by b_ashish on 21-Mar-16.\n */\npublic class TabDialogFragment extends BaseDialogFragment {\n\n    protected final static String ARG_MESSAGE = \"message\";\n    protected final static String ARG_TITLE = \"title\";\n    protected final static String ARG_SUB_TITLE = \"sub_title\";\n    protected final static String ARG_POSITIVE_BUTTON = \"positive_button\";\n    protected final static String ARG_NEGATIVE_BUTTON = \"negative_button\";\n    protected final static String ARG_NEUTRAL_BUTTON = \"neutral_button\";\n\n    protected final static String ARG_TAB_BUTTON = \"tab_button\";\n\n\n    public static TabDialogBuilder createBuilder(Context context, FragmentManager fragmentManager) {\n        return new TabDialogBuilder(context, fragmentManager, TabDialogFragment.class);\n    }\n\n    @Override\n    public void onActivityCreated(Bundle savedInstanceState) {\n        super.onActivityCreated(savedInstanceState);\n    }\n\n    /**\n     * Key method for extending {com.avast.android.dialogs.fragment.TabDialogFragment}.\n     * Children can extend this to add more things to base builder.\n     */\n    @Override\n    protected BaseDialogFragment.Builder build(BaseDialogFragment.Builder builder) {\n        final CharSequence title = getTitle();\n        if (!TextUtils.isEmpty(title)) {\n            builder.setTitle(title);\n        }\n\n        final CharSequence subTitle = getSubTitle();\n        if (!TextUtils.isEmpty(subTitle)) {\n            builder.setSubTitle(subTitle);\n        }\n\n        final CharSequence message = getMessage();\n        if (!TextUtils.isEmpty(message)) {\n            builder.setMessage(message);\n        }\n\n        final CharSequence positiveButtonText = getPositiveButtonText();\n        if (!TextUtils.isEmpty(positiveButtonText)) {\n            builder.setPositiveButton(positiveButtonText, new View.OnClickListener() {\n                @Override\n                public void onClick(View view) {\n                    for (IPositiveButtonDialogListener listener : getPositiveButtonDialogListeners()) {\n                        listener.onPositiveButtonClicked(mRequestCode);\n                    }\n                    dismiss();\n                }\n            });\n        }\n\n        final CharSequence negativeButtonText = getNegativeButtonText();\n        if (!TextUtils.isEmpty(negativeButtonText)) {\n            builder.setNegativeButton(negativeButtonText, new View.OnClickListener() {\n                @Override\n                public void onClick(View view) {\n                    for (INegativeButtonDialogListener listener : getNegativeButtonDialogListeners()) {\n                        listener.onNegativeButtonClicked(mRequestCode);\n                    }\n                    dismiss();\n                }\n            });\n        }\n\n        final CharSequence neutralButtonText = getNeutralButtonText();\n        if (!TextUtils.isEmpty(neutralButtonText)) {\n            builder.setNeutralButton(neutralButtonText, new View.OnClickListener() {\n                @Override\n                public void onClick(View view) {\n                    for (INeutralButtonDialogListener listener : getNeutralButtonDialogListeners()) {\n                        listener.onNeutralButtonClicked(mRequestCode);\n                    }\n                    dismiss();\n                }\n            });\n        }\n\n        final CharSequence[] tabButtonText = getTabButtonText();\n        if (tabButtonText != null && tabButtonText.length > 0) {\n            buildTab(builder);\n        }\n\n        return builder;\n    }\n\n    private void buildTab(final Builder builder) {\n\n        builder.setTabItems(\n                prepareAdapter(), getTabButtonText());\n    }\n\n\n    private TabViewPagerAdapter prepareAdapter() {\n\n        TabViewPagerAdapter tabViewPagerAdapter = new TabViewPagerAdapter(getChildFragmentManager(), getTabButtonText());\n        return tabViewPagerAdapter;\n\n    }\n\n    protected CharSequence getMessage() {\n        return getArguments().getCharSequence(ARG_MESSAGE);\n    }\n\n    protected CharSequence getTitle() {\n        return getArguments().getCharSequence(ARG_TITLE);\n    }\n\n    protected CharSequence getSubTitle() {\n        return getArguments().getCharSequence(ARG_SUB_TITLE);\n    }\n\n    protected CharSequence getPositiveButtonText() {\n        return getArguments().getCharSequence(ARG_POSITIVE_BUTTON);\n    }\n\n    protected CharSequence getNegativeButtonText() {\n        return getArguments().getCharSequence(ARG_NEGATIVE_BUTTON);\n    }\n\n    protected CharSequence getNeutralButtonText() {\n        return getArguments().getCharSequence(ARG_NEUTRAL_BUTTON);\n    }\n\n    protected CharSequence[] getTabButtonText() {\n        return getArguments().getCharSequenceArray(ARG_TAB_BUTTON);\n    }\n\n\n    /**\n     * Get positive button dialog listeners.\n     * There might be more than one listener.\n     *\n     * @return Dialog listeners\n     * @since 2.1.0\n     */\n    protected List<IPositiveButtonDialogListener> getPositiveButtonDialogListeners() {\n        return getDialogListeners(IPositiveButtonDialogListener.class);\n    }\n\n    /**\n     * Get negative button dialog listeners.\n     * There might be more than one listener.\n     *\n     * @return Dialog listeners\n     * @since 2.1.0\n     */\n    protected List<INegativeButtonDialogListener> getNegativeButtonDialogListeners() {\n        return getDialogListeners(INegativeButtonDialogListener.class);\n    }\n\n    /**\n     * Get neutral button dialog listeners.\n     * There might be more than one listener.\n     *\n     * @return Dialog listeners\n     * @since 2.1.0\n     */\n    protected List<INeutralButtonDialogListener> getNeutralButtonDialogListeners() {\n        return getDialogListeners(INeutralButtonDialogListener.class);\n    }\n\n\n    public static class TabDialogBuilder extends BaseDialogBuilder {\n\n        private CharSequence mTitle;\n        private CharSequence mSubTitle;\n        private CharSequence mMessage;\n        private CharSequence mPositiveButtonText;\n        private CharSequence mNegativeButtonText;\n        private CharSequence mNeutralButtonText;\n\n        private CharSequence[] mTabButtonText;\n\n\n        public TabDialogBuilder(Context context, FragmentManager fragmentManager, Class<? extends BaseDialogFragment> clazz) {\n            super(context, fragmentManager, clazz);\n        }\n\n        @Override\n        protected TabDialogBuilder self() {\n            return this;\n        }\n\n        public TabDialogBuilder setTitle(int titleResourceId) {\n            mTitle = mContext.getString(titleResourceId);\n            return this;\n        }\n\n\n        public TabDialogBuilder setTitle(CharSequence title) {\n            mTitle = title;\n            return this;\n        }\n\n        public TabDialogBuilder setSubTitle(int subTitleResourceId) {\n            mSubTitle = mContext.getString(subTitleResourceId);\n            return this;\n        }\n\n        public TabDialogBuilder setSubTitle(CharSequence subTitle) {\n            mSubTitle = subTitle;\n            return this;\n        }\n\n        public TabDialogBuilder setMessage(int messageResourceId) {\n            mMessage = mContext.getText(messageResourceId);\n            return this;\n        }\n\n        /**\n         * Allow to set resource string with HTML formatting and bind %s,%i.\n         * This is workaround for https://code.google.com/p/android/issues/detail?id=2923\n         */\n        public TabDialogBuilder setMessage(int resourceId, Object... formatArgs) {\n            mMessage = Html.fromHtml(String.format(Html.toHtml(new SpannedString(mContext.getText(resourceId))), formatArgs));\n            return this;\n        }\n\n        public TabDialogBuilder setMessage(CharSequence message) {\n            mMessage = message;\n            return this;\n        }\n\n        public TabDialogBuilder setPositiveButtonText(int textResourceId) {\n            mPositiveButtonText = mContext.getString(textResourceId);\n            return this;\n        }\n\n        public TabDialogBuilder setPositiveButtonText(CharSequence text) {\n            mPositiveButtonText = text;\n            return this;\n        }\n\n        public TabDialogBuilder setNegativeButtonText(int textResourceId) {\n            mNegativeButtonText = mContext.getString(textResourceId);\n            return this;\n        }\n\n        public TabDialogBuilder setNegativeButtonText(CharSequence text) {\n            mNegativeButtonText = text;\n            return this;\n        }\n\n        public TabDialogBuilder setNeutralButtonText(int textResourceId) {\n            mNeutralButtonText = mContext.getString(textResourceId);\n            return this;\n        }\n\n        public TabDialogBuilder setNeutralButtonText(CharSequence text) {\n            mNeutralButtonText = text;\n            return this;\n        }\n\n        public TabDialogBuilder setTabButtonText(CharSequence[] value) {\n            mTabButtonText = value;\n            return this;\n        }\n\n        @Override\n        protected Bundle prepareArguments() {\n            Bundle args = new Bundle();\n            args.putCharSequence(TabDialogFragment.ARG_MESSAGE, mMessage);\n            args.putCharSequence(TabDialogFragment.ARG_TITLE, mTitle);\n            args.putCharSequence(TabDialogFragment.ARG_SUB_TITLE, mSubTitle);\n            args.putCharSequence(TabDialogFragment.ARG_POSITIVE_BUTTON, mPositiveButtonText);\n            args.putCharSequence(TabDialogFragment.ARG_NEGATIVE_BUTTON, mNegativeButtonText);\n            args.putCharSequence(TabDialogFragment.ARG_NEUTRAL_BUTTON, mNeutralButtonText);\n\n            args.putCharSequenceArray(TabDialogFragment.ARG_TAB_BUTTON, mTabButtonText);\n\n            return args;\n        }\n    }\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/IFragmentListener.java",
    "content": "package com.androidifygeeks.library.iface;\n\nimport android.support.v4.app.Fragment;\n\n/**\n * Created by b_ashish on 23-Mar-16.\n */\npublic interface IFragmentListener {\n\n    void onFragmentViewCreated(Fragment fragment);\n\n    void onFragmentAttached(Fragment fragment);\n\n    void onFragmentDetached(Fragment fragment);\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/INegativeButtonDialogListener.java",
    "content": "package com.androidifygeeks.library.iface;\n\n/**\n * Implement this interface in Activity or Fragment to react to negative dialog buttons.\n *\n * @author Tomáš Kypta\n * @since 2.1.0\n */\npublic interface INegativeButtonDialogListener {\n\n    public void onNegativeButtonClicked(int requestCode);\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/INeutralButtonDialogListener.java",
    "content": "package com.androidifygeeks.library.iface;\n\n/**\n * Implement this interface in Activity or Fragment to react to neutral dialog buttons.\n *\n * @author Tomáš Kypta\n * @since 2.1.0\n */\npublic interface INeutralButtonDialogListener {\n\n    public void onNeutralButtonClicked(int requestCode);\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/IPositiveButtonDialogListener.java",
    "content": "package com.androidifygeeks.library.iface;\n\n/**\n * Implement this interface in Activity or Fragment to react to positive dialog buttons.\n *\n * @author Tomáš Kypta\n * @since 2.1.0\n */\npublic interface IPositiveButtonDialogListener {\n\n    public void onPositiveButtonClicked(int requestCode);\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/ISimpleDialogCancelListener.java",
    "content": "/*\n * Copyright 2013 Inmite s.r.o. (www.inmite.eu).\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.androidifygeeks.library.iface;\n\n/**\n * Implement this interface in Activity or Fragment to react when the dialog is cancelled.\n * This listener is common for all types of dialogs.\n *\n * @author Tomáš Kypta\n */\npublic interface ISimpleDialogCancelListener {\n\n    public void onCancelled(int requestCode);\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/iface/ISimpleDialogListener.java",
    "content": "/*\n * Copyright 2013 Inmite s.r.o. (www.inmite.eu).\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.androidifygeeks.library.iface;\n\n/**\n * Implement this interface in Activity or Fragment to react to positive, negative and neutral dialog buttons.\n *\n * @author David Vávra (david@inmite.eu)\n */\npublic interface ISimpleDialogListener extends IPositiveButtonDialogListener, INegativeButtonDialogListener, INeutralButtonDialogListener {\n\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/util/MultiSwipeRefreshLayout.java",
    "content": "/*\n * Copyright 2014 Google Inc. All rights reserved.\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.androidifygeeks.library.util;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.drawable.Drawable;\nimport android.support.v4.widget.SwipeRefreshLayout;\nimport android.util.AttributeSet;\n\nimport com.androidifygeeks.library.R;\n\npublic class MultiSwipeRefreshLayout extends SwipeRefreshLayout {\n    private CanChildScrollUpCallback mCanChildScrollUpCallback;\n\n    private Drawable mForegroundDrawable;\n\n    public MultiSwipeRefreshLayout(Context context) {\n        this(context, null);\n    }\n\n    public MultiSwipeRefreshLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        final TypedArray a = context.obtainStyledAttributes(attrs,\n                R.styleable.MultiSwipeRefreshLayout, 0, 0);\n\n        mForegroundDrawable = a.getDrawable(R.styleable.MultiSwipeRefreshLayout_foreground);\n        if (mForegroundDrawable != null) {\n            mForegroundDrawable.setCallback(this);\n            setWillNotDraw(false);\n        }\n\n        a.recycle();\n    }\n\n    @Override\n    protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n        super.onSizeChanged(w, h, oldw, oldh);\n        if (mForegroundDrawable != null) {\n            mForegroundDrawable.setBounds(0, 0, w, h);\n        }\n    }\n\n    @Override\n    public void draw(Canvas canvas) {\n        super.draw(canvas);\n        if (mForegroundDrawable != null) {\n            mForegroundDrawable.draw(canvas);\n        }\n    }\n\n    public void setCanChildScrollUpCallback(CanChildScrollUpCallback canChildScrollUpCallback) {\n        mCanChildScrollUpCallback = canChildScrollUpCallback;\n    }\n\n    public static interface CanChildScrollUpCallback {\n        public boolean canSwipeRefreshChildScrollUp();\n    }\n\n    @Override\n    public boolean canChildScrollUp() {\n        if (mCanChildScrollUpCallback != null) {\n            return mCanChildScrollUpCallback.canSwipeRefreshChildScrollUp();\n        }\n        return super.canChildScrollUp();\n    }\n}\n"
  },
  {
    "path": "library/src/main/java/com/androidifygeeks/library/util/TypefaceHelper.java",
    "content": "package com.androidifygeeks.library.util;\n\nimport android.content.Context;\nimport android.graphics.Typeface;\nimport android.support.v4.util.SimpleArrayMap;\n\n/*\n    Taken from:\n    https://github.com/afollestad/material-dialogs/blob/master/library/src/main/java/com/afollestad/materialdialogs/util/TypefaceHelper.java\n\n    Each call to Typeface.createFromAsset will load a new instance of the typeface into memory,\n    and this memory is not consistently get garbage collected\n    http://code.google.com/p/android/issues/detail?id=9904\n    (It states released but even on Lollipop you can see the typefaces accumulate even after\n    multiple GC passes)\n    You can detect this by running:\n    adb shell dumpsys meminfo com.your.packagenage\n    You will see output like:\n     Asset Allocations\n        zip:/data/app/com.your.packagenage-1.apk:/assets/Roboto-Medium.ttf: 125K\n        zip:/data/app/com.your.packagenage-1.apk:/assets/Roboto-Medium.ttf: 125K\n        zip:/data/app/com.your.packagenage-1.apk:/assets/Roboto-Medium.ttf: 125K\n        zip:/data/app/com.your.packagenage-1.apk:/assets/Roboto-Regular.ttf: 123K\n        zip:/data/app/com.your.packagenage-1.apk:/assets/Roboto-Medium.ttf: 125K\n*/\npublic class TypefaceHelper {\n\n    private static final SimpleArrayMap<String, Typeface> cache = new SimpleArrayMap<>();\n\n    public static Typeface get(Context c, String name) {\n        synchronized (cache) {\n            if (!cache.containsKey(name)) {\n                Typeface t = Typeface.createFromAsset(\n                        c.getAssets(), String.format(\"fonts/%s.ttf\", name));\n                cache.put(name, t);\n                return t;\n            }\n            return cache.get(name);\n        }\n    }\n}"
  },
  {
    "path": "library/src/main/res/drawable/page_margin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2015 Google Inc. All rights reserved.\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<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item>\n        <color android:color=\"#ddd\"/>\n    </item>\n    <item android:right=\"12dp\">\n        <shape android:shape=\"rectangle\">\n            <gradient\n                android:angle=\"0\"\n                android:endColor=\"#ddd\"\n                android:startColor=\"#ccc\"/>\n        </shape>\n    </item>\n    <item android:left=\"12dp\">\n        <shape android:shape=\"rectangle\">\n            <gradient\n                android:angle=\"180\"\n                android:endColor=\"#ddd\"\n                android:startColor=\"#ccc\"/>\n        </shape>\n    </item>\n</layer-list>\n"
  },
  {
    "path": "library/src/main/res/layout/horizontal_separator.xml",
    "content": "<!--\n  Copyright 2014 Google Inc. All rights reserved.\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<View xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      android:layout_marginTop=\"4dp\"\n      android:layout_marginBottom=\"4dp\"\n      android:layout_marginLeft=\"8dp\"\n      android:layout_marginRight=\"8dp\"\n      android:gravity=\"start|center_vertical\"\n      android:layout_width=\"match_parent\"\n      android:background=\"#e5e5e5\"\n      android:layout_height=\"1dp\"/>\n\n"
  },
  {
    "path": "library/src/main/res/layout/tdl_dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        style=\"@style/HeaderBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:theme=\"@style/ActionBarThemeOverlay\">\n\n        <include layout=\"@layout/tdl_dialog_header\" />\n\n        <android.support.design.widget.TabLayout\n            android:id=\"@+id/tdl_sliding_tabs\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@color/tab_background\"\n            app:tabGravity=\"center\"\n            app:tabIndicatorColor=\"@color/tab_selected_strip\"\n            app:tabMode=\"scrollable\"\n            app:tabSelectedTextColor=\"@color/text_on_primary\"\n            app:tabTextAppearance=\"@style/MyDialogTabTextAppearancce\" />\n\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:orientation=\"vertical\">\n\n        <com.androidifygeeks.library.util.MultiSwipeRefreshLayout\n            android:id=\"@+id/tdl_swipe_refresh_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\">\n\n            <android.support.v4.view.ViewPager\n                android:id=\"@+id/tdl_view_pager\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\" />\n\n        </com.androidifygeeks.library.util.MultiSwipeRefreshLayout>\n\n    </LinearLayout>\n\n    <include layout=\"@layout/horizontal_separator\" />\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:gravity=\"center_vertical\">\n\n        <Button\n            android:id=\"@+id/tdl_button_neutral\"\n            android:minWidth=\"@dimen/card_min_button_width\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"@dimen/spacing_micro\"\n            android:layout_marginStart=\"@dimen/spacing_micro\"\n            android:layout_marginEnd=\"@dimen/spacing_normal\"\n            android:layout_marginRight=\"@dimen/spacing_normal\"\n            android:paddingLeft=\"@dimen/spacing_normal\"\n            android:paddingStart=\"@dimen/spacing_normal\"\n            android:paddingRight=\"@dimen/spacing_normal\"\n            android:paddingEnd=\"@dimen/spacing_normal\"\n            android:textAllCaps=\"true\"\n            android:textSize=\"@dimen/text_size_medium\"\n            android:fontFamily=\"@string/font_fontFamily_medium\"\n            android:textColor=\"@color/flat_button_text\"\n            tools:text=\"Neutral\"\n            style=\"?android:borderlessButtonStyle\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/tdl_button_negative\"\n                android:minWidth=\"@dimen/card_min_button_width\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:paddingLeft=\"@dimen/spacing_normal\"\n                android:paddingStart=\"@dimen/spacing_normal\"\n                android:paddingRight=\"@dimen/spacing_normal\"\n                android:paddingEnd=\"@dimen/spacing_normal\"\n                android:textAllCaps=\"true\"\n                android:textSize=\"@dimen/text_size_medium\"\n                android:fontFamily=\"@string/font_fontFamily_medium\"\n                android:textColor=\"@color/flat_button_text\"\n                tools:text=\"Negative\"\n                style=\"?android:borderlessButtonStyle\"/>\n\n            <Button\n                android:id=\"@+id/tdl_button_positive\"\n                android:minWidth=\"@dimen/card_min_button_width\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"@dimen/spacing_micro\"\n                android:layout_marginStart=\"@dimen/spacing_micro\"\n                android:layout_marginEnd=\"@dimen/spacing_normal\"\n                android:layout_marginRight=\"@dimen/spacing_normal\"\n                android:layout_gravity=\"end\"\n                android:paddingLeft=\"@dimen/spacing_normal\"\n                android:paddingStart=\"@dimen/spacing_normal\"\n                android:paddingRight=\"@dimen/spacing_normal\"\n                android:paddingEnd=\"@dimen/spacing_normal\"\n                android:textAllCaps=\"true\"\n                android:textSize=\"@dimen/text_size_medium\"\n                android:fontFamily=\"@string/font_fontFamily_medium\"\n                android:textColor=\"@color/flat_button_text\"\n                android:layout_below=\"@+id/description\"\n                android:layout_alignParentEnd=\"true\"\n                android:layout_alignParentRight=\"true\"\n                style=\"?android:borderlessButtonStyle\"\n                tools:text=\"Positive\" />\n\n        </LinearLayout>\n    </RelativeLayout>\n</LinearLayout>"
  },
  {
    "path": "library/src/main/res/layout/tdl_dialog_header.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/toolbar_actionbar\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"?actionBarSize\"\n    android:layout_weight=\"1\"\n    android:background=\"@color/tab_background\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"vertical\"\n    app:contentInsetStart=\"?actionBarInsetStart\"\n    app:popupTheme=\"@style/ActionBarPopupThemeOverlay\"\n    app:theme=\"@style/ActionBarThemeOverlay\">\n\n    <TextView\n        android:id=\"@+id/tdl_title_text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginLeft=\"@dimen/padding_normal\"\n        android:layout_marginStart=\"@dimen/padding_normal\"\n        android:singleLine=\"true\"\n        android:textAppearance=\"@style/TextAppearance.Head\" />\n\n    <TextView\n        android:id=\"@+id/tdl_subtitle_text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"@dimen/padding_normal\"\n        android:layout_marginStart=\"@dimen/padding_normal\"\n        android:layout_marginTop=\"@dimen/spacing_micro\"\n        android:singleLine=\"true\"\n        android:textAppearance=\"@style/TextAppearance.Subhead\" />\n\n</LinearLayout>\n"
  },
  {
    "path": "library/src/main/res/layout/tdl_fragment_container.xml",
    "content": "<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n             android:layout_width=\"match_parent\"\n             android:layout_height=\"match_parent\"\n             android:gravity=\"center\"\n             android:id=\"@+id/root_container\">\n\n</FrameLayout>\n\n"
  },
  {
    "path": "library/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Declare custom theme attributes that allow changing which styles are\n        used for button bars depending on the API level.\n        ?android:attr/buttonBarStyle is new as of API 11 so this is\n        necessary to support previous API levels. -->\n    <declare-styleable name=\"ButtonBarContainerTheme\">\n        <attr name=\"actionBarInsetStart\" format=\"dimension\" />\n    </declare-styleable>\n\n    <declare-styleable name=\"MultiSwipeRefreshLayout\">\n        <attr name=\"foreground\" format=\"reference\" />\n    </declare-styleable>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!--general color -->\n    <color name=\"blue\">#1976D2</color>\n    <color name=\"white\">#FFFFFF</color>\n\n\n    <color name=\"text_on_primary\">#ff004446</color>\n    <color name=\"subtitle_on_primary\">#de004446</color>\n\n    <color name=\"item_text_primary_head_color\">@color/white</color>\n    <color name=\"item_text_primary_color\">#ff275B64</color>\n\n    <color name=\"tab_background\">@color/blue</color>\n    <color name=\"tab_selected_strip\">@android:color/white</color>\n    <color name=\"unselected_tab_on_primary\">#b3004446</color>\n\n    <color name=\"flat_button_text\">#ff008094</color>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <dimen name=\"padding_normal\">16dp</dimen>\n    <dimen name=\"spacing_normal\">8dp</dimen>\n    <dimen name=\"spacing_micro\">4dp</dimen>\n\n    <dimen name=\"headerbar_elevation\">4dp</dimen>\n\n    <dimen name=\"my_tab_view_page_margin\">@dimen/padding_normal</dimen>\n    <dimen name=\"dialog_main_pane_height\">165dp</dimen>\n\n    <dimen name=\"card_min_button_width\">48dp</dimen>\n    <dimen name=\"text_size_medium\">14sp</dimen>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/fonts.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2015 Google Inc. All rights reserved.\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    <integer name=\"font_textStyle_medium\">1</integer> <!-- bold -->\n    <string name=\"font_fontFamily_medium\">sans-serif</string>\n</resources>\n"
  },
  {
    "path": "library/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">library</string>\n\n</resources>\n"
  },
  {
    "path": "library/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"HeaderBar\">\n        <item name=\"android:background\">?colorPrimary</item>\n        <item name=\"android:elevation\">@dimen/headerbar_elevation</item>\n    </style>\n\n    <style name=\"ActionBarPopupThemeOverlay\" parent=\"ThemeOverlay.AppCompat.Light\" />\n\n    <style name=\"ActionBarThemeOverlay\" parent=\"ThemeOverlay.AppCompat.ActionBar\">\n        <item name=\"android:textColorPrimary\">@color/text_on_primary</item>\n        <item name=\"android:textColorSecondary\">@color/subtitle_on_primary</item>\n    </style>\n\n    <style name=\"TextAppearance.Body2\" parent=\"TextAppearance.AppCompat.Body2\">\n        <item name=\"android:textSize\">14sp</item>\n        <!-- bug in AppCompat, can remove this when it's fixed -->\n        <item name=\"android:fontFamily\">sans-serif-medium</item>\n        <item name=\"android:textColor\">?android:textColorSecondary</item>\n    </style>\n\n    <style name=\"TextAppearance.Head\" parent=\"TextAppearance.Body2\">\n        <item name=\"android:textSize\">16sp</item>\n        <item name=\"android:textColor\">@color/item_text_primary_head_color</item>\n    </style>\n\n    <style name=\"TextAppearance.Subhead\" parent=\"TextAppearance.Body2\">\n        <item name=\"android:textColor\">@color/item_text_primary_color</item>\n    </style>\n\n    <style name=\"MyDialogTabTextAppearancce\" parent=\"TextAppearance.Design.Tab\">\n        <item name=\"android:textColor\">@color/unselected_tab_on_primary</item>\n    </style>\n\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values-sw600dp/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- standard metrics -->\n    <dimen name=\"spacing_normal\">12dp</dimen>\n    <dimen name=\"spacing_micro\">8dp</dimen>\n    \n</resources>"
  },
  {
    "path": "library/src/main/res/values-v21/fonts.xml",
    "content": "<!--\n  Copyright 2014 Google Inc. All rights reserved.\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    <integer name=\"font_textStyle_medium\">0</integer> <!-- normal -->\n    <string name=\"font_fontFamily_medium\" translatable=\"false\">sans-serif-medium</string>\n</resources>\n"
  },
  {
    "path": "library/src/test/java/com/androidifygeeks/library/ExampleUnitTest.java",
    "content": "package com.androidifygeeks.library;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':library'\n"
  }
]