├── Studio └── GridListViewAdapters │ ├── settings.gradle │ ├── build.gradle │ ├── .gitignore │ ├── gridlistviewadapters │ ├── src │ │ └── main │ │ │ ├── res │ │ │ └── values │ │ │ │ └── dummy_ids.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── birin │ │ │ └── gridlistviewadapters │ │ │ ├── utils │ │ │ ├── OnLoadMoreRequestListener.java │ │ │ ├── MaxCardsInfo.java │ │ │ ├── ChildViewsClickHandler.java │ │ │ ├── PositionCalculator.java │ │ │ └── GridDataStructure.java │ │ │ ├── dataholders │ │ │ ├── RowDataHolder.java │ │ │ ├── CardDataHolder.java │ │ │ └── CardPositionInfo.java │ │ │ ├── RowViewHolder.java │ │ │ ├── Card.java │ │ │ ├── CursorFilter.java │ │ │ └── ListGridAdapter.java │ └── build.gradle │ ├── gradlew.bat │ └── gradlew ├── Extras ├── Documentations │ ├── steps.png │ ├── ListGridAdapterQuickUsageGuide.md │ ├── CursorGridAdapterQuickUsageGuide.md │ └── debugging_exceptions.md └── Images │ └── Icon │ └── Grid_icon_512x512.png ├── Eclipse ├── GridListViewAdaptersDemo │ ├── res │ │ ├── drawable-hdpi │ │ │ └── launcher.png │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ ├── card_background.xml │ │ │ ├── simplest_card_background.xml │ │ │ ├── simplest_header_footer_background.xml │ │ │ └── simplest_card_btn_background.xml │ │ └── layout │ │ │ ├── auto_load_more_footer.xml │ │ │ ├── demo_menu_listrow_layout.xml │ │ │ ├── demo_menu_screen_layout.xml │ │ │ ├── load_more_button_footer.xml │ │ │ ├── cursor_demo_menu_screen_layout.xml │ │ │ ├── simplest_card_layout.xml │ │ │ ├── activity_main.xml │ │ │ ├── simplest_header_footer_layout.xml │ │ │ └── card_layout.xml │ ├── project.properties │ ├── src │ │ └── com │ │ │ └── birin │ │ │ ├── listgridadapter │ │ │ ├── demo2 │ │ │ │ └── FixedListItems.java │ │ │ ├── demo4 │ │ │ │ ├── ChildAndCardClickHandlingFixedListItems.java │ │ │ │ └── ChildAndCardClickHandlingEmployeeListGridAdapter.java │ │ │ ├── demo3 │ │ │ │ ├── CardClickHandlingEmployeeListGridAdapter.java │ │ │ │ └── CardClickHandlingFixedListItems.java │ │ │ ├── datasetup │ │ │ │ ├── Employee.java │ │ │ │ └── RetainedDataFragment.java │ │ │ ├── demo7 │ │ │ │ └── UnlimitedListItemsRotationSupportAutoLoadMoreMax100Items.java │ │ │ ├── demo8 │ │ │ │ └── UnlimitedListItemsRotationSupportClickToLoadMore.java │ │ │ ├── demo5 │ │ │ │ └── FixedListItemsRotationSupport.java │ │ │ ├── demo6 │ │ │ │ └── UnlimitedListItemsRotationSupportAutoLoadMore.java │ │ │ └── base │ │ │ │ ├── BaseListGridActivity.java │ │ │ │ └── BaseEmployeeListGridAdapter.java │ │ │ ├── cursorgridadapter │ │ │ ├── demo1 │ │ │ │ └── FixedCursorItems.java │ │ │ ├── demo3 │ │ │ │ ├── ChildAndCardClickHandlingFixedCursorItems.java │ │ │ │ └── ChildAndCardClickHandlingEmployeeCursorGridAdapter.java │ │ │ ├── demo2 │ │ │ │ ├── CardClickHandlingEmployeeCursorGridAdapter.java │ │ │ │ └── CardClickHandlingFixedCursorItems.java │ │ │ ├── datasetup │ │ │ │ ├── TestContentProviderSqlHelper.java │ │ │ │ └── CursorRetainingFragment.java │ │ │ ├── demo6 │ │ │ │ └── UnlimitedCursorItemsRotationClickToLoadMore.java │ │ │ ├── demo4 │ │ │ │ └── FixedCursorItemsRotationSupport.java │ │ │ ├── demo5 │ │ │ │ └── UnlimitedCursorItemsRotationSupportAutoLoadMore.java │ │ │ └── base │ │ │ │ ├── BaseCursorGridActivity.java │ │ │ │ └── BaseEmployeeCursorGridAdapter.java │ │ │ └── gridlistviewadaptersdemo │ │ │ ├── common │ │ │ ├── EmployeeCardViewHolder.java │ │ │ ├── RandomInfoGenerator.java │ │ │ ├── Constants.java │ │ │ └── CharacterDrawable.java │ │ │ ├── ParentDemoMenuList.java │ │ │ ├── BaseDemoMenuList.java │ │ │ ├── JavaUtilListDataDemos.java │ │ │ └── CursorDataDemos.java │ ├── .project │ └── AndroidManifest.xml └── GridListViewAdapters │ ├── project.properties │ ├── res │ └── values │ │ └── dummy_ids.xml │ ├── .project │ ├── AndroidManifest.xml │ └── src │ └── com │ └── birin │ └── gridlistviewadapters │ ├── dataholders │ ├── RowDataHolder.java │ ├── CardDataHolder.java │ └── CardPositionInfo.java │ ├── utils │ ├── OnLoadMoreRequestListener.java │ ├── MaxCardsInfo.java │ ├── ChildViewsClickHandler.java │ ├── PositionCalculator.java │ └── GridDataStructure.java │ ├── RowViewHolder.java │ ├── Card.java │ ├── CursorFilter.java │ └── ListGridAdapter.java ├── .gitignore ├── LICENSE └── README.md /Studio/GridListViewAdapters/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':gridlistviewadapters' 2 | -------------------------------------------------------------------------------- /Extras/Documentations/steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birajpatel/GridListViewAdapters/HEAD/Extras/Documentations/steps.png -------------------------------------------------------------------------------- /Extras/Images/Icon/Grid_icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birajpatel/GridListViewAdapters/HEAD/Extras/Images/Icon/Grid_icon_512x512.png -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/drawable-hdpi/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/birajpatel/GridListViewAdapters/HEAD/Eclipse/GridListViewAdaptersDemo/res/drawable-hdpi/launcher.png -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #6CE6D7 5 | #586AC4 6 | #32586AC4 7 | #F2E24E 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Eclipse project files 23 | .classpath 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Log Files 29 | *.log 30 | 31 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Grid ListView Adapters 5 | Loading with dummy wait... 6 | Click to load more... 7 | Clean Employee table 8 | Cleaning table please wait... 9 | 10 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.2.3' 9 | classpath 'com.github.dcendents:android-maven-plugin:1.2' 10 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | jcenter() 17 | } 18 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014-present Biraj Patel 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-20 15 | android.library=true 16 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-20 15 | android.library.reference.1=../GridListViewAdapters 16 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | # *.apk 3 | *.ap_ 4 | 5 | 6 | # Files for the Dalvik VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | 16 | # Gradle files 17 | gradle 18 | .gradle 19 | build/ 20 | /*/build/ 21 | /*/*/build 22 | build 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | /*/local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Eclipse project files 35 | .classpath 36 | .project 37 | 38 | # Android Studio 39 | .idea/ 40 | 41 | # Windows thumbnail db 42 | Thumbs.db 43 | 44 | # OSX files 45 | .DS_Store 46 | 47 | /*/*.iml 48 | *.iml 49 | 50 | .idea/gradle.xml -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/listgridadapter/demo2/FixedListItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.listgridadapter.demo2; 17 | 18 | import com.birin.listgridadapter.base.BaseListGridActivity; 19 | 20 | public class FixedListItems extends BaseListGridActivity { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/cursorgridadapter/demo1/FixedCursorItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.cursorgridadapter.demo1; 17 | 18 | import com.birin.cursorgridadapter.base.BaseCursorGridActivity; 19 | 20 | public class FixedCursorItems extends BaseCursorGridActivity { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/res/values/dummy_ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/gridlistviewadapters/src/main/res/values/dummy_ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | GridListViewAdapters 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | GridListViewAdaptersDemo 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/drawable/card_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/drawable/simplest_card_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/drawable/simplest_header_footer_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 20 | 21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/layout/auto_load_more_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/gridlistviewadapters/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 20 | 21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/gridlistviewadaptersdemo/common/EmployeeCardViewHolder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadaptersdemo.common; 17 | 18 | import android.widget.ImageView; 19 | import android.widget.RelativeLayout; 20 | import android.widget.TextView; 21 | 22 | public class EmployeeCardViewHolder { 23 | 24 | public TextView employeeName; 25 | public ImageView employeeImage; 26 | public RelativeLayout employeeImageContainer; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/layout/demo_menu_listrow_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 24 | 25 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/layout/demo_menu_screen_layout.xml: -------------------------------------------------------------------------------- 1 | 16 | 20 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/drawable/simplest_card_btn_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/listgridadapter/demo4/ChildAndCardClickHandlingFixedListItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.listgridadapter.demo4; 17 | 18 | import com.birin.listgridadapter.base.BaseEmployeeListGridAdapter; 19 | import com.birin.listgridadapter.demo3.CardClickHandlingFixedListItems; 20 | 21 | public class ChildAndCardClickHandlingFixedListItems extends 22 | CardClickHandlingFixedListItems { 23 | 24 | protected BaseEmployeeListGridAdapter getListAdapter() { 25 | return new ChildAndCardClickHandlingEmployeeListGridAdapter( 26 | getApplicationContext(), getMaxCardsInRow()); 27 | } 28 | 29 | protected String getToastMessage() { 30 | return "Click on any card or ID TextView..."; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/gridlistviewadaptersdemo/common/RandomInfoGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadaptersdemo.common; 17 | 18 | import java.util.Random; 19 | 20 | import android.graphics.Color; 21 | 22 | public class RandomInfoGenerator { 23 | 24 | private static final Random RANDOM_GENERATOR = new Random(); 25 | 26 | private final static String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 27 | 28 | public static int getRandomColor() { 29 | return Color.argb(255, RANDOM_GENERATOR.nextInt(256), 30 | RANDOM_GENERATOR.nextInt(256), RANDOM_GENERATOR.nextInt(256)); 31 | } 32 | 33 | public static char getRandomChar() { 34 | return CHARACTERS.charAt(RANDOM_GENERATOR.nextInt(26)); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/cursorgridadapter/demo3/ChildAndCardClickHandlingFixedCursorItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.cursorgridadapter.demo3; 17 | 18 | import com.birin.cursorgridadapter.base.BaseEmployeeCursorGridAdapter; 19 | import com.birin.cursorgridadapter.demo2.CardClickHandlingFixedCursorItems; 20 | 21 | public class ChildAndCardClickHandlingFixedCursorItems extends 22 | CardClickHandlingFixedCursorItems { 23 | 24 | protected BaseEmployeeCursorGridAdapter getListViewAdapter() { 25 | return new ChildAndCardClickHandlingEmployeeCursorGridAdapter( 26 | getApplicationContext(), getMaxCardsInRow(), null); 27 | } 28 | 29 | protected String getToastMessage() { 30 | return "Click on any card or ID TextView..."; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/gridlistviewadapters/src/main/java/com/birin/gridlistviewadapters/utils/OnLoadMoreRequestListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | * not use this file except in compliance with the License. You may obtain a 5 | * copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | * License for the specific language governing permissions and limitations 11 | * under the License. 12 | */ 13 | package com.birin.gridlistviewadapters.utils; 14 | 15 | /** 16 | * The listener interface for receiving onLoadMoreRequest events. The class that 17 | * is interested in processing a onLoadMoreRequest event implements this 18 | * interface, and the object created with that class is registered with a 19 | * component using the component's 20 | * addOnLoadMoreRequestListener method. When 21 | * the onLoadMoreRequest event occurs, that object's appropriate 22 | * method is invoked. 23 | */ 24 | public interface OnLoadMoreRequestListener { 25 | 26 | /** 27 | * On load more requested. 28 | */ 29 | public abstract void onLoadMoreRequested(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/src/com/birin/gridlistviewadapters/dataholders/RowDataHolder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadapters.dataholders; 17 | 18 | import java.util.ArrayList; 19 | 20 | /** 21 | * This class holds list of card's positional properties. This class bundles 22 | * {@link CardDataHolder}. This RowDataHolder class corresponds to positional 23 | * properties of a single row, This List will be directly fed to 24 | * GridAdapters to render UI. 25 | * 26 | * @see CardPositionInfo 27 | */ 28 | public final class RowDataHolder { 29 | 30 | private ArrayList cardPositionInfos = new ArrayList(); 31 | 32 | public ArrayList getCardPositionInfos() { 33 | return cardPositionInfos; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/src/com/birin/gridlistviewadapters/utils/OnLoadMoreRequestListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadapters.utils; 17 | 18 | /** 19 | * The listener interface for receiving onLoadMoreRequest events. The class that 20 | * is interested in processing a onLoadMoreRequest event implements this 21 | * interface, and the object created with that class is registered with a 22 | * component using the component's 23 | * addOnLoadMoreRequestListener method. When 24 | * the onLoadMoreRequest event occurs, that object's appropriate 25 | * method is invoked. 26 | * 27 | * @see OnLoadMoreRequestEvent 28 | */ 29 | public interface OnLoadMoreRequestListener { 30 | 31 | /** 32 | * On load more requested. 33 | */ 34 | public abstract void onLoadMoreRequested(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/src/com/birin/gridlistviewadaptersdemo/ParentDemoMenuList.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadaptersdemo; 17 | 18 | public class ParentDemoMenuList extends BaseDemoMenuList { 19 | 20 | private final Demo[] AVAILABLE_DEMOS = { 21 | new Demo( 22 | "ListGridAdapter Demo\nUsed for java.util.List data\n(" 23 | + JavaUtilListDataDemos.AVAILABLE_DEMOS.length 24 | + " Demos)", JavaUtilListDataDemos.class), 25 | new Demo( 26 | "CursorGridAdapter Demo\nUsed for android.database.Cursor data\n(" 27 | + CursorDataDemos.AVAILABLE_DEMOS.length 28 | + " Demos)", CursorDataDemos.class), 29 | 30 | }; 31 | 32 | @Override 33 | protected Demo[] getDemos() { 34 | return AVAILABLE_DEMOS; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdapters/src/com/birin/gridlistviewadapters/RowViewHolder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadapters; 17 | 18 | import java.util.ArrayList; 19 | 20 | /** 21 | * The Class RowViewHolder which holds together all CardViewHolders present in a 22 | * single row. 23 | * 24 | * @param 25 | * the CardViewHolder type which is going to be held in this class. 26 | */ 27 | class RowViewHolder { 28 | 29 | /** 30 | * The card view holders list, this list holds all the CardViewHolders 31 | * present in a single row. 32 | */ 33 | private ArrayList cardViewHolders = new ArrayList(); 34 | 35 | /** 36 | * Gets the card view holders list 37 | * 38 | * @return the card view holders 39 | */ 40 | public ArrayList getCardViewHolders() { 41 | return cardViewHolders; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Studio/GridListViewAdapters/gridlistviewadapters/src/main/java/com/birin/gridlistviewadapters/dataholders/RowDataHolder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014-present Biraj Patel 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use this file except in compliance with the License. You may obtain a 6 | * copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | package com.birin.gridlistviewadapters.dataholders; 17 | 18 | import java.util.ArrayList; 19 | 20 | /** 21 | * This class holds list of card's positional properties. This class bundles 22 | * {@link CardDataHolder}. This RowDataHolder class corresponds to positional 23 | * properties of a single row, This List of RowDataHolder will be directly fed to 24 | * GridAdapters to render UI. 25 | * 26 | * @see CardPositionInfo 27 | */ 28 | public final class RowDataHolder { 29 | 30 | private ArrayList cardPositionInfos = new ArrayList(); 31 | 32 | public ArrayList getCardPositionInfos() { 33 | return cardPositionInfos; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Eclipse/GridListViewAdaptersDemo/res/layout/load_more_button_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 |