├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── libraries
│ ├── ComAndroidSupportAppcompatV71800_aar.xml
│ └── support_v4_18_0_0.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── README.md
├── TabbedDialog.iml
├── TabbedDialog
├── .gitignore
├── TabbedDialog-TabbedDialog.iml
├── build.gradle
├── proguard-rules.txt
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-web.png
│ ├── java
│ └── com
│ │ └── jooik
│ │ └── tabbeddialog
│ │ ├── MainActivity.java
│ │ └── fragments
│ │ ├── FragmentDialog.java
│ │ ├── Fragment_Tab_1.java
│ │ ├── Fragment_Tab_2.java
│ │ └── Fragment_Tab_3.java
│ └── res
│ ├── drawable-hdpi
│ └── ic_launcher.png
│ ├── drawable-mdpi
│ └── ic_launcher.png
│ ├── drawable-xhdpi
│ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ └── ic_launcher.png
│ ├── layout
│ ├── activity_main.xml
│ ├── fragment_dialog.xml
│ ├── fragment_main.xml
│ ├── fragment_tab_1.xml
│ ├── fragment_tab_2.xml
│ └── fragment_tab_3.xml
│ ├── menu
│ └── main.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── images
├── screenie.png
├── screenie01.png
├── screenie02.png
└── twitter.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | TabbedDialog
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/ComAndroidSupportAppcompatV71800_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_18_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 1.6
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Android_Tabbed_Dialog
2 | =====================
3 |
4 | Create a simple Tabbed Dialog as this is not as trivial as it seems to be... :-(
5 | This step by step guide explains how to create a dialog overlay with a tab swipe component, see screenie below.
6 |
7 | 
8 |
9 | Instead of following our step by step guide you can simply checkout the whole project and populate the tab fragments based on your needs or simply extend the whole project…feel free, any feedback is highly appreciated:
10 |
11 | [ ](https://twitter.com/_flomueller "Twitter")
12 |
13 | ## 1 Create tabs (=fragments)
14 |
15 | The tab swipe component (in Android it's a core FragmentPageAdapter) enables you to put several fragments in a tab component, each tab should hold one fragment so let's start by creating the tab fragments for your overlay. We will create three fragments (Fragment_Tab_1, Fragment_Tab_2, Fragment_Tab_3) - below there is a very lightweight fragment implementation, this implementation can be applied to Fragment_Tab_1,2,…n. In our example we ant to define the UI via layout xml file so during creation make sure each fragment has a layout counterpart…
16 |
17 | ### Fragment adapter code
18 | **(Fragment_Tab_1.java)**
19 |
20 | ```java
21 | package com.jooik.tabbeddialog.fragments;
22 |
23 | import android.os.Bundle;
24 | import android.support.v4.app.Fragment;
25 | import android.view.LayoutInflater;
26 | import android.view.View;
27 | import android.view.ViewGroup;
28 |
29 | import com.jooik.tabbeddialog.R;
30 |
31 | /**
32 | * A simple counterpart for tab1 layout...
33 | */
34 | public class Fragment_Tab_1 extends Fragment
35 | {
36 | @Override
37 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
38 | {
39 | return inflater.inflate(R.layout.fragment_tab_1, container, false);
40 | }
41 | }
42 | ```
43 |
44 | ### XML layout definition
45 | **(fragment_tab_1.xml)**
46 |
47 | ```xml
48 |
49 |
50 |
54 |
58 |
59 | ```
60 |
61 | ## 2 Create Dialog Fragment (= "Tab Host")
62 | Next the fragments need to be placed/grouped somehow, therefor you have to create a new fragment…within this fragment (we also need a corresponding layout file) certain magic ties in the previously created tab fragments so let's get started with our lesson in magic ;-)
63 |
64 | There are several steps you need to apply in order to enable your fragment grouping the tabs, let's start with the layout extensions. The layout needs to contain a tab host which easily can be achieved by adding a ViewPager component, within this ViewPager we have to add a PagerTitleStrip
65 |
66 | ### 2.1 Add tab host to layout…
67 | **(fragment_dialog.xml)**
68 |
69 | Simply copy/past the contents below to your fragment XML, the whole file should look like this:
70 |
71 | ```xml
72 |
77 |
78 |
86 |
87 |
88 | ```
89 |
90 | ### 2.2 Initialize tab host in Java Adapter
91 | **(FragmentDialog.java)**
92 |
93 | *1) You need to add a inner class to your fragment java code extending FragmentPageAdapter. This class will handle instantiation etc. of your fragments while the user swipes over the tab host…ass the code below to the java part of your fragment:*
94 |
95 | ```java
96 | // ------------------------------------------------------------------------
97 | // inner classes
98 | // ------------------------------------------------------------------------
99 |
100 | /**
101 | * Used for tab paging...
102 | */
103 | public class SectionsPagerAdapter extends FragmentPagerAdapter
104 | {
105 |
106 | public SectionsPagerAdapter(FragmentManager fm) {
107 | super(fm);
108 | }
109 |
110 | @Override
111 | public Fragment getItem(int position) {
112 | if (position == 0)
113 | {
114 | // find first fragment...
115 | Fragment_Tab_1 ft1 = new Fragment_Tab_1();
116 | return ft1;
117 | }
118 | if (position == 1)
119 | {
120 | // find first fragment...
121 | Fragment_Tab_2 ft2 = new Fragment_Tab_2();
122 | return ft2;
123 | }
124 | else if (position == 2)
125 | {
126 | // find first fragment...
127 | Fragment_Tab_3 ft3 = new Fragment_Tab_3();
128 | return ft3;
129 | }
130 |
131 | return null;
132 | }
133 |
134 | @Override
135 | public int getCount() {
136 | // Show 2 total pages.
137 | return 3;
138 | }
139 |
140 | @Override
141 | public CharSequence getPageTitle(int position) {
142 | switch (position) {
143 | case 0:
144 | return "First Tab";
145 | case 1:
146 | return "Second Tab";
147 | case 2:
148 | return "Third Tab";
149 | }
150 | return null;
151 | }
152 | }
153 | ```
154 |
155 | *2) Make your fragment class extending **DialogFragment** instead of Fragment (in case you dont wanna display the tab host as a dialog skip this step…)*
156 |
157 | ```java
158 | public class FragmentDialog extends DialogFragment
159 | ```
160 |
161 | *3) Finally implement usage and initialisation of FragmentPageAdapter. We are overriding **onCreateDialog** AND **onCreateView**, this enables us to control dialog look & feel (Titlebar, buttons, colors) via onCreateDialog, anything view related goes into onCreateView…add the following java snippet to your adapter:*
162 |
163 | **ATTENTION: when instantiating a FragmentPageAdapter from a fragment you can not use *getSupportFragmentManager()/getFragmentManager()*. Instead of this you have to use *getChildFragmentManager*. So replace the child fragment manager stuff in case you wanna display a tab host within the context of an activity directly…***
164 |
165 | ```java
166 | // ------------------------------------------------------------------------
167 | // members
168 | // ------------------------------------------------------------------------
169 |
170 | private SectionsPagerAdapter sectionsPagerAdapter;
171 | private ViewPager viewPager;
172 |
173 | // ------------------------------------------------------------------------
174 | // public usage
175 | // ------------------------------------------------------------------------
176 |
177 | @Override
178 | public Dialog onCreateDialog(final Bundle savedInstanceState)
179 | {
180 | Dialog dialog = super.onCreateDialog(savedInstanceState);
181 | dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
182 | //dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.YELLOW));
183 | dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
184 | return dialog;
185 | }
186 |
187 | @Override
188 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
189 | View view = inflater.inflate(R.layout.fragment_dialog, container);
190 |
191 | // tab slider
192 | sectionsPagerAdapter = new SectionsPagerAdapter(getChildFragmentManager());
193 |
194 | // Set up the ViewPager with the sections adapter.
195 | viewPager = (ViewPager)view.findViewById(R.id.pager);
196 | viewPager.setAdapter(sectionsPagerAdapter);
197 |
198 | return view;
199 | }
200 | ```
201 |
202 | ## 3 Invoke/Open dialog
203 |
204 | Nearly finished! Finally add a button to your main activity (programmatically or XML based does not matter), add the following implementation as button click handler..:
205 |
206 | ```java
207 | /**
208 | * Fire up popup dialog...
209 | * @param view
210 | */
211 | public void onOpenDialog(View view)
212 | {
213 | FragmentManager fm = getSupportFragmentManager();
214 | FragmentDialog overlay = new FragmentDialog();
215 | overlay.show(fm, "FragmentDialog");
216 | }
217 | ```
218 |
219 | ## 4 DONE! Enjoy your tab host popover window… :-)
220 |
221 | 
222 | 
--------------------------------------------------------------------------------
/TabbedDialog.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TabbedDialog/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/TabbedDialog/TabbedDialog-TabbedDialog.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/TabbedDialog/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:0.6.+'
7 | }
8 | }
9 | apply plugin: 'android'
10 |
11 | repositories {
12 | mavenCentral()
13 | }
14 |
15 | android {
16 | compileSdkVersion 18
17 | buildToolsVersion "18.1.1"
18 |
19 | defaultConfig {
20 | minSdkVersion 7
21 | targetSdkVersion 19
22 | }
23 | buildTypes {
24 | release {
25 | runProguard true
26 | proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
27 | }
28 | }
29 | productFlavors {
30 | defaultFlavor {
31 | proguardFile 'proguard-rules.txt'
32 | }
33 | }
34 | }
35 |
36 | dependencies {
37 | compile 'com.android.support:appcompat-v7:+'
38 | }
39 |
--------------------------------------------------------------------------------
/TabbedDialog/proguard-rules.txt:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the ProGuard
5 | # include property in project.properties.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
--------------------------------------------------------------------------------
/TabbedDialog/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/TabbedDialog/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/TabbedDialog/src/main/java/com/jooik/tabbeddialog/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.jooik.tabbeddialog;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 |
10 | import com.jooik.tabbeddialog.fragments.FragmentDialog;
11 |
12 | public class MainActivity extends ActionBarActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_main);
18 | }
19 |
20 |
21 | @Override
22 | public boolean onCreateOptionsMenu(Menu menu) {
23 |
24 | // Inflate the menu; this adds items to the action bar if it is present.
25 | getMenuInflater().inflate(R.menu.main, menu);
26 | return true;
27 | }
28 |
29 | @Override
30 | public boolean onOptionsItemSelected(MenuItem item) {
31 | // Handle action bar item clicks here. The action bar will
32 | // automatically handle clicks on the Home/Up button, so long
33 | // as you specify a parent activity in AndroidManifest.xml.
34 | int id = item.getItemId();
35 | if (id == R.id.action_settings) {
36 | return true;
37 | }
38 | return super.onOptionsItemSelected(item);
39 | }
40 |
41 | /**
42 | * Fire up popup dialog...
43 | * @param view
44 | */
45 | public void onOpenDialog(View view)
46 | {
47 | FragmentManager fm = getSupportFragmentManager();
48 | FragmentDialog overlay = new FragmentDialog();
49 | overlay.show(fm, "FragmentDialog");
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/java/com/jooik/tabbeddialog/fragments/FragmentDialog.java:
--------------------------------------------------------------------------------
1 | package com.jooik.tabbeddialog.fragments;
2 |
3 | import android.app.Dialog;
4 | import android.os.Bundle;
5 | import android.support.v4.app.DialogFragment;
6 | import android.support.v4.app.Fragment;
7 | import android.support.v4.app.FragmentManager;
8 | import android.support.v4.app.FragmentPagerAdapter;
9 | import android.support.v4.view.ViewPager;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.view.Window;
14 |
15 | import com.jooik.tabbeddialog.R;
16 |
17 | /**
18 | * Fragment dialog displaying tab host...
19 | */
20 | public class FragmentDialog extends DialogFragment
21 | {
22 | // ------------------------------------------------------------------------
23 | // members
24 | // ------------------------------------------------------------------------
25 |
26 | private SectionsPagerAdapter sectionsPagerAdapter;
27 | private ViewPager viewPager;
28 |
29 | // ------------------------------------------------------------------------
30 | // public usage
31 | // ------------------------------------------------------------------------
32 |
33 | @Override
34 | public Dialog onCreateDialog(final Bundle savedInstanceState)
35 | {
36 | Dialog dialog = super.onCreateDialog(savedInstanceState);
37 | dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
38 | //dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.YELLOW));
39 | dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
40 | return dialog;
41 | }
42 |
43 | @Override
44 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
45 | View view = inflater.inflate(R.layout.fragment_dialog, container);
46 |
47 | // tab slider
48 | sectionsPagerAdapter = new SectionsPagerAdapter(getChildFragmentManager());
49 |
50 | // Set up the ViewPager with the sections adapter.
51 | viewPager = (ViewPager)view.findViewById(R.id.pager);
52 | viewPager.setAdapter(sectionsPagerAdapter);
53 |
54 | return view;
55 | }
56 |
57 | // ------------------------------------------------------------------------
58 | // inner classes
59 | // ------------------------------------------------------------------------
60 |
61 | /**
62 | * Used for tab paging...
63 | */
64 | public class SectionsPagerAdapter extends FragmentPagerAdapter
65 | {
66 |
67 | public SectionsPagerAdapter(FragmentManager fm) {
68 | super(fm);
69 | }
70 |
71 | @Override
72 | public Fragment getItem(int position) {
73 | if (position == 0)
74 | {
75 | // find first fragment...
76 | Fragment_Tab_1 ft1 = new Fragment_Tab_1();
77 | return ft1;
78 | }
79 | if (position == 1)
80 | {
81 | // find first fragment...
82 | Fragment_Tab_2 ft2 = new Fragment_Tab_2();
83 | return ft2;
84 | }
85 | else if (position == 2)
86 | {
87 | // find first fragment...
88 | Fragment_Tab_3 ft3 = new Fragment_Tab_3();
89 | return ft3;
90 | }
91 |
92 | return null;
93 | }
94 |
95 | @Override
96 | public int getCount() {
97 | // Show 2 total pages.
98 | return 3;
99 | }
100 |
101 | @Override
102 | public CharSequence getPageTitle(int position) {
103 | switch (position) {
104 | case 0:
105 | return "First Tab";
106 | case 1:
107 | return "Second Tab";
108 | case 2:
109 | return "Third Tab";
110 | }
111 | return null;
112 | }
113 | }
114 | }
--------------------------------------------------------------------------------
/TabbedDialog/src/main/java/com/jooik/tabbeddialog/fragments/Fragment_Tab_1.java:
--------------------------------------------------------------------------------
1 | package com.jooik.tabbeddialog.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.jooik.tabbeddialog.R;
10 |
11 | /**
12 | * A simple counterpart for tab1 layout...
13 | */
14 | public class Fragment_Tab_1 extends Fragment
15 | {
16 | @Override
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
18 | {
19 | return inflater.inflate(R.layout.fragment_tab_1, container, false);
20 | }
21 | }
--------------------------------------------------------------------------------
/TabbedDialog/src/main/java/com/jooik/tabbeddialog/fragments/Fragment_Tab_2.java:
--------------------------------------------------------------------------------
1 | package com.jooik.tabbeddialog.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.jooik.tabbeddialog.R;
10 |
11 | /**
12 | * A simple counterpart for tab1 layout...
13 | */
14 | public class Fragment_Tab_2 extends Fragment
15 | {
16 | @Override
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
18 | {
19 | return inflater.inflate(R.layout.fragment_tab_2, container, false);
20 | }
21 | }
--------------------------------------------------------------------------------
/TabbedDialog/src/main/java/com/jooik/tabbeddialog/fragments/Fragment_Tab_3.java:
--------------------------------------------------------------------------------
1 | package com.jooik.tabbeddialog.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.jooik.tabbeddialog.R;
10 |
11 | /**
12 | * A simple counterpart for tab1 layout...
13 | */
14 | public class Fragment_Tab_3 extends Fragment
15 | {
16 | @Override
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
18 | {
19 | return inflater.inflate(R.layout.fragment_tab_3, container, false);
20 | }
21 | }
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/TabbedDialog/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/TabbedDialog/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/TabbedDialog/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/TabbedDialog/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/fragment_dialog.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/fragment_tab_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/fragment_tab_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/layout/fragment_tab_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
7 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TabbedDialog
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TabbedDialog/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Set Gradle settings which apply to all modules here.
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/images/screenie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/images/screenie.png
--------------------------------------------------------------------------------
/images/screenie01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/images/screenie01.png
--------------------------------------------------------------------------------
/images/screenie02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/images/screenie02.png
--------------------------------------------------------------------------------
/images/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kiteflo/Android_Tabbed_Dialog/42305611154ee772e97def012a1430c1c8bb486f/images/twitter.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':TabbedDialog'
2 |
--------------------------------------------------------------------------------