├── .gitignore
├── AdMobApplication
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── admobapplication
│ │ │ └── ExampleInstrumentationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── admobapplication
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── admobapplication
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── AdMobFirebase
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── google-services.json
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── admobfirebase
│ │ │ └── ExampleInstrumentationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── admobfirebase
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── admobfirebase
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── AndroidLocalizing
├── .gitignore
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── ro
│ │ │ └── funcode
│ │ │ └── androidlocalizing
│ │ │ └── ApplicationTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── androidlocalizing
│ │ │ ├── LocalizedTextView.java
│ │ │ └── MainActivity.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
│ │ └── quizz.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── values-ro
│ │ └── strings.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── attributes.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── AndroidTCPClient
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── kazy
│ │ │ └── tcpclient
│ │ │ ├── ApplicationProvider.java
│ │ │ ├── ClientActivity.java
│ │ │ ├── ClientListAdapter.java
│ │ │ ├── Constants.java
│ │ │ ├── PreferencesActivity.java
│ │ │ ├── PreferencesManager.java
│ │ │ └── TcpClient.java
│ │ └── res
│ │ ├── layout
│ │ ├── list_item.xml
│ │ └── main.xml
│ │ ├── menu
│ │ └── main_menu.xml
│ │ ├── values
│ │ └── strings.xml
│ │ └── xml
│ │ └── preferences.xml
├── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── readme.md
└── settings.gradle
├── BuildVariants
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── diana
│ │ │ └── buildvariants
│ │ │ └── ExampleInstrumentationTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── diana
│ │ │ │ └── buildvariants
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── diana
│ │ └── buildvariants
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── FreePaidApplication
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── diana
│ │ │ └── freepaidapplication
│ │ │ └── ExampleInstrumentationTest.java
│ │ ├── free
│ │ └── res
│ │ │ └── values
│ │ │ └── colors.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── diana
│ │ │ │ └── freepaidapplication
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── paid
│ │ └── res
│ │ │ └── values
│ │ │ └── colors.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── diana
│ │ └── freepaidapplication
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── GSONSerializer
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── ro
│ │ │ └── funcode
│ │ │ └── gsonserializer
│ │ │ └── ApplicationTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── gsonserializer
│ │ │ ├── MainActivity.java
│ │ │ ├── Sample.java
│ │ │ └── SampleGSONParserAdapter.java
│ │ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── 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
└── settings.gradle
├── GradleExample
└── GradleExample
│ ├── .gitignore
│ ├── LibraryModuleA
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── librarymodulea
│ │ │ └── librarymodulea
│ │ │ └── LibraryModuleAActivity.java
│ │ └── res
│ │ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── layout
│ │ └── activity_library_module_a.xml
│ │ ├── menu
│ │ └── library_module_a.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ └── strings.xml
│ ├── LibraryModuleB
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── librarymoduleb
│ │ │ └── librarymoduleb
│ │ │ └── LibraryModuleBActivity.java
│ │ └── res
│ │ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── layout
│ │ └── activity_library_module_b.xml
│ │ ├── menu
│ │ └── library_module_b.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ └── strings.xml
│ ├── MainModule
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── gradleexample
│ │ │ └── mainmodule
│ │ │ └── MainActivity.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
│ │ ├── menu
│ │ └── main.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── MainModuleSecondary
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── ro
│ │ │ └── funcode
│ │ │ └── mainmodulesecondary
│ │ │ └── mainmodulesecondary
│ │ │ └── MainModuleSecondary.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_module_secondary.xml
│ │ ├── menu
│ │ └── main_module_secondary.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
│ └── settings.gradle
├── JavaTCPServer
└── src
│ └── ro
│ └── kazy
│ └── tcp
│ ├── Constants.java
│ ├── MainScreen.java
│ ├── TcpServer.java
│ ├── User.java
│ └── UserManager.java
├── LICENSE
├── Miscellaneous
├── LICENSE
├── Miscellaneous
│ ├── .gitignore
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── ro
│ │ │ │ └── funcode
│ │ │ │ └── miscellaneous
│ │ │ │ └── ApplicationTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── ro
│ │ │ │ │ └── funcode
│ │ │ │ │ └── miscellaneous
│ │ │ │ │ └── expandable_list_view
│ │ │ │ │ ├── ClassRoom.java
│ │ │ │ │ ├── ExpandableListSample.java
│ │ │ │ │ ├── ExpandableListViewAdapter.java
│ │ │ │ │ └── Student.java
│ │ │ └── res
│ │ │ │ ├── layout
│ │ │ │ ├── activity_expandable_list_sample.xml
│ │ │ │ ├── expandable_list_item_child.xml
│ │ │ │ └── expandable_list_item_parent.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── ro
│ │ │ └── funcode
│ │ │ └── miscellaneous
│ │ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── README.md
├── NavigationViewTabs
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── navigationviewtabs
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── navigationviewtabs
│ │ │ │ ├── ContainerFragment.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── PageFragment.java
│ │ │ │ └── SimpleRecyclerAdapter.java
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── fragment_container.xml
│ │ │ ├── fragment_page.xml
│ │ │ ├── nav_header.xml
│ │ │ └── recycler_item.xml
│ │ │ ├── menu
│ │ │ └── navigation_items.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ └── styles.xml
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── navigationviewtabs
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── README.md
├── RealmResetSample
├── .gitignore
├── RealmResetModule
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── realmreset
│ │ │ └── sample
│ │ │ ├── ASuperActivity.java
│ │ │ ├── Activity2.java
│ │ │ ├── Activity3.java
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── layout
│ │ ├── activity_2.xml
│ │ ├── activity_3.xml
│ │ ├── activity_asuper.xml
│ │ └── activity_main.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ └── strings.xml
├── build.gradle
├── gradlew
├── gradlew.bat
├── proguard-rules.pro
└── settings.gradle
└── TabsTutorial
├── .gitignore
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── tabstutorial
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── tabstutorial
│ │ ├── Fragment1.java
│ │ ├── Fragment2.java
│ │ ├── Fragment3.java
│ │ ├── MainActivity.java
│ │ └── TabsListener.java
│ └── res
│ ├── drawable-hdpi
│ ├── fab_ic_add.png
│ └── ic_launcher.png
│ ├── drawable-mdpi
│ ├── fab_ic_add.png
│ └── ic_launcher.png
│ ├── drawable-xhdpi
│ ├── fab_ic_add.png
│ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ ├── fab_ic_add.png
│ └── ic_launcher.png
│ ├── drawable-xxxhdpi
│ └── fab_ic_add.png
│ ├── layout
│ ├── activity_main.xml
│ ├── fragment_fragment1.xml
│ ├── fragment_fragment2.xml
│ └── fragment_fragment3.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── 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
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
18 | # Eclipse project files
19 | .classpath
20 | .project
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Intellij project files
26 | *.iml
27 | *.ipr
28 | *.iws
29 | .idea/
30 | RealmResetSample/RealmResetModule/build
31 | RealmResetSample/.gradle
32 | RealmResetSample/gradle
33 | AndroidTCPClient/.gradle
34 | AndroidTCPClient/app/build
35 | AndroidTCPClient/build
36 |
--------------------------------------------------------------------------------
/AdMobApplication/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/AdMobApplication/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/AdMobApplication/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 | defaultConfig {
7 | applicationId "com.example.admobapplication"
8 | minSdkVersion 15
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:23.4.0'
25 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
26 | compile 'com.google.android.gms:play-services:9.0.2'
27 | testCompile 'junit:junit:4.12'
28 | androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
29 | androidTestCompile 'com.android.support.test:runner:0.5'
30 | androidTestCompile 'com.android.support:support-annotations:23.4.0'
31 | }
32 |
--------------------------------------------------------------------------------
/AdMobApplication/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\diana\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/androidTest/java/com/example/admobapplication/ExampleInstrumentationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.admobapplication;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.filters.MediumTest;
6 | import android.support.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Instrumentation test, which will execute on an Android device.
16 | *
17 | * @see Testing documentation
18 | */
19 | @MediumTest
20 | @RunWith(AndroidJUnit4.class)
21 | public class ExampleInstrumentationTest {
22 | @Test
23 | public void useAppContext() throws Exception {
24 | // Context of the app under test.
25 | Context appContext = InstrumentationRegistry.getTargetContext();
26 |
27 | assertEquals("com.example.admobapplication", appContext.getPackageName());
28 | }
29 | }
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/java/com/example/admobapplication/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.admobapplication;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.gms.ads.AdRequest;
7 | import com.google.android.gms.ads.AdView;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 | AdView adView = (AdView) this.findViewById(R.id.adMob);
17 | //request TEST ads to avoid being disabled for clicking your own ads
18 | AdRequest adRequest = new AdRequest.Builder()
19 | .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)// This is for emulators
20 | //test mode on DEVICE (this example code must be replaced with your device uniquq ID)
21 | .addTestDevice("2EAB96D84FE62876379A9C030AA6A0AC") // Nexus 5
22 | .build();
23 | adView.loadAd(adRequest);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AdMob Application
3 |
4 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AdMobApplication/app/src/test/java/com/example/admobapplication/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.admobapplication;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/AdMobApplication/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha5'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/AdMobApplication/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/AdMobApplication/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobApplication/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AdMobApplication/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/AdMobApplication/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/AdMobFirebase/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 | defaultConfig {
7 | applicationId "com.example.admobfirebase"
8 | minSdkVersion 15
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:23.4.0'
25 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
26 | compile 'com.google.firebase:firebase-ads:9.0.2'
27 | testCompile 'junit:junit:4.12'
28 | androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
29 | androidTestCompile 'com.android.support.test:runner:0.5'
30 | androidTestCompile 'com.android.support:support-annotations:23.4.0'
31 | }
32 |
33 | apply plugin: 'com.google.gms.google-services'
34 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "255305068079",
4 | "firebase_url": "https://test-3cdc2.firebaseio.com",
5 | "project_id": "test-3cdc2",
6 | "storage_bucket": "test-3cdc2.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:255305068079:android:5835ad323c7f9bd0",
12 | "android_client_info": {
13 | "package_name": "com.example.admobfirebase"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "255305068079-6ou27otpa87o5pegon43iai8hbrf5va3.apps.googleusercontent.com",
19 | "client_type": 3
20 | }
21 | ],
22 | "api_key": [
23 | {
24 | "current_key": "AIzaSyBxko94N30zljgC7IFju4XN4xlAoTgVU0E"
25 | }
26 | ],
27 | "services": {
28 | "analytics_service": {
29 | "status": 1
30 | },
31 | "appinvite_service": {
32 | "status": 1,
33 | "other_platform_oauth_client": []
34 | },
35 | "ads_service": {
36 | "status": 2
37 | }
38 | }
39 | }
40 | ],
41 | "configuration_version": "1"
42 | }
--------------------------------------------------------------------------------
/AdMobFirebase/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\diana\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/androidTest/java/com/example/admobfirebase/ExampleInstrumentationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.admobfirebase;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.filters.MediumTest;
6 | import android.support.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Instrumentation test, which will execute on an Android device.
16 | *
17 | * @see Testing documentation
18 | */
19 | @MediumTest
20 | @RunWith(AndroidJUnit4.class)
21 | public class ExampleInstrumentationTest {
22 | @Test
23 | public void useAppContext() throws Exception {
24 | // Context of the app under test.
25 | Context appContext = InstrumentationRegistry.getTargetContext();
26 |
27 | assertEquals("com.example.admobfirebase", appContext.getPackageName());
28 | }
29 | }
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/java/com/example/admobfirebase/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.admobfirebase;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.gms.ads.AdRequest;
7 | import com.google.android.gms.ads.AdView;
8 | import com.google.android.gms.ads.MobileAds;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_main);
16 |
17 | MobileAds.initialize(getApplicationContext(), "YOUR UNIT ID");
18 |
19 | AdView adView = (AdView) this.findViewById(R.id.adMob);
20 | //request TEST ads to avoid being disabled for clicking your own ads
21 | AdRequest adRequest = new AdRequest.Builder()
22 | .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)// This is for emulators
23 | //test mode on DEVICE (this example code must be replaced with your device uniquq ID)
24 | // .addTestDevice("2EAB96D84FE62876379A9C030AA6A0AC") // Nexus 5
25 | .build();
26 | adView.loadAd(adRequest);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
20 |
21 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AdMob Firebase
3 |
4 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AdMobFirebase/app/src/test/java/com/example/admobfirebase/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.admobfirebase;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/AdMobFirebase/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
9 | classpath 'com.google.gms:google-services:3.0.0'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
25 |
--------------------------------------------------------------------------------
/AdMobFirebase/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/AdMobFirebase/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AdMobFirebase/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AdMobFirebase/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/AdMobFirebase/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/AndroidLocalizing/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 |
--------------------------------------------------------------------------------
/AndroidLocalizing/README.md:
--------------------------------------------------------------------------------
1 | funcodetuts
2 | ===========
3 |
4 | Funcode sample tutorials
5 |
6 | You can find the explanation for this code here: [Localized TextView on Android](http://www.myandroidsolutions.com/2015/01/15/load-localized-strings-at-runtime/).
7 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 21
5 | buildToolsVersion "21.1.2"
6 |
7 | defaultConfig {
8 | applicationId "ro.funcode.androidlocalizing"
9 | minSdkVersion 9
10 | targetSdkVersion 21
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:21.0.3'
25 | }
26 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/catalinprata/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/androidTest/java/ro/funcode/androidlocalizing/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.androidlocalizing;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/java/ro/funcode/androidlocalizing/MainActivity.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.androidlocalizing;
2 |
3 | import android.content.SharedPreferences;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 |
9 | public class MainActivity extends ActionBarActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 |
15 | // the filename is important! This should be used to fetch the localized strings as well!!
16 | SharedPreferences settings = getSharedPreferences("localization_strings_file", 0);
17 | SharedPreferences.Editor editor = settings.edit();
18 |
19 | // add some translations to SharedPreferences
20 | editor.putString("ro_hello_world", "Salutare lume!");
21 | editor.putString("en_hello_world", "Hello world!");
22 |
23 | // Commit the edits!
24 | editor.commit();
25 |
26 | // now we can load the text
27 | setContentView(R.layout.activity_main);
28 | }
29 |
30 | @Override
31 | public boolean onCreateOptionsMenu(Menu menu) {
32 | // Inflate the menu; this adds items to the action bar if it is present.
33 | getMenuInflater().inflate(R.menu.menu_main, menu);
34 | return true;
35 | }
36 |
37 | @Override
38 | public boolean onOptionsItemSelected(MenuItem item) {
39 | // Handle action bar item clicks here. The action bar will
40 | // automatically handle clicks on the Home/Up button, so long
41 | // as you specify a parent activity in AndroidManifest.xml.
42 | int id = item.getItemId();
43 |
44 | //noinspection SimplifiableIfStatement
45 | if (id == R.id.action_settings) {
46 | return true;
47 | }
48 |
49 | return super.onOptionsItemSelected(item);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidLocalizing/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidLocalizing/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidLocalizing/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidLocalizing/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/layout/quizz.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values-ro/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AndroidLocalizing
4 | ro_hello_world
5 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values/attributes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | AndroidLocalizing
5 | en_hello_world
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AndroidLocalizing/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AndroidLocalizing/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.0.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/AndroidLocalizing/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/AndroidLocalizing/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidLocalizing/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AndroidLocalizing/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=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/AndroidLocalizing/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | buildToolsVersion "27.0.3"
6 |
7 | defaultConfig {
8 | applicationId "ro.kazy.tcpclient"
9 | minSdkVersion 14
10 | targetSdkVersion 27
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/java/ro/kazy/tcpclient/ApplicationProvider.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcpclient;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 | /**
7 | * Created by catalin on 12/29/13.
8 | */
9 | public class ApplicationProvider extends Application {
10 |
11 | private static Context sApplicationContext;
12 |
13 | @Override
14 | public void onCreate() {
15 | super.onCreate();
16 |
17 | sApplicationContext = getApplicationContext();
18 |
19 | }
20 |
21 | public static Context getContext() {
22 | return sApplicationContext;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/java/ro/kazy/tcpclient/Constants.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcpclient;
2 |
3 | /**
4 | * Description
5 | *
6 | * @author Catalin Prata
7 | * Date: 2/12/13
8 | */
9 | public class Constants {
10 |
11 | public static final String CLOSED_CONNECTION = "kazy_closed_connection";
12 | public static final String LOGIN_NAME = "kazy_login_name";
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/java/ro/kazy/tcpclient/PreferencesActivity.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcpclient;
2 |
3 | import android.os.Bundle;
4 | import android.preference.PreferenceActivity;
5 |
6 | /**
7 | * Created by catalin on 12/29/13.
8 | */
9 | public class PreferencesActivity extends PreferenceActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 |
15 | addPreferencesFromResource(R.xml.preferences);
16 |
17 | }
18 |
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/java/ro/kazy/tcpclient/PreferencesManager.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcpclient;
2 |
3 | import android.content.SharedPreferences;
4 | import android.preference.PreferenceManager;
5 |
6 | /**
7 | * Used to load username from the preferences
8 | *
9 | * Created by catalin on 12/29/13.
10 | */
11 | public class PreferencesManager {
12 |
13 | private static PreferencesManager ourInstance = new PreferencesManager();
14 | private SharedPreferences mPreferenceManager;
15 |
16 | public static PreferencesManager getInstance() {
17 | return ourInstance;
18 | }
19 |
20 | private PreferencesManager() {
21 |
22 | mPreferenceManager = PreferenceManager.getDefaultSharedPreferences(ApplicationProvider.getContext());
23 |
24 | }
25 |
26 | public String getUserName(){
27 | return mPreferenceManager.getString("pref_username", null);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
14 |
15 |
16 |
21 |
22 |
27 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | tcpClient
4 |
5 |
--------------------------------------------------------------------------------
/AndroidTCPClient/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/AndroidTCPClient/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 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:3.0.1'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | jcenter()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/AndroidTCPClient/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/AndroidTCPClient/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AndroidTCPClient/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jan 19 20:53:18 EET 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/AndroidTCPClient/readme.md:
--------------------------------------------------------------------------------
1 | # Simple Android to PC TCP messaging example
2 |
3 |
4 | This is a simple **Android** to **PC**(Java) messaging example, it uses AsyncTask to run the client tasks in a secondary thread.
5 |
6 | You can find more details about the implementation on [myandroidsolutions](http://www.myandroidsolutions.com/2013/03/31/android-tcp-connection-enhanced/).
7 |
--------------------------------------------------------------------------------
/AndroidTCPClient/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/BuildVariants/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/BuildVariants/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/BuildVariants/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 | defaultConfig {
7 | applicationId "com.example.diana.buildvariants"
8 | minSdkVersion 15
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 |
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 |
21 | qa {
22 | applicationIdSuffix ".qa"
23 |
24 | // signingConfigs as debug key needed. Otherwise, the app won't run and it will ask
25 | // you to sign the apk
26 | signingConfig signingConfigs.debug
27 | }
28 | }
29 |
30 | productFlavors {
31 | free {
32 | applicationId "com.example.myapp.free"
33 | versionName "1.0-free"
34 | minSdkVersion 23
35 | }
36 |
37 | paid {
38 | applicationId "com.example.myapp.paid"
39 | versionName "1.0-paid"
40 | }
41 | }
42 | }
43 |
44 | dependencies {
45 | compile fileTree(dir: 'libs', include: ['*.jar'])
46 | compile 'com.android.support:appcompat-v7:23.4.0'
47 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
48 | testCompile 'junit:junit:4.12'
49 | androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
50 | androidTestCompile 'com.android.support.test:runner:0.5'
51 | androidTestCompile 'com.android.support:support-annotations:23.4.0'
52 | }
53 |
--------------------------------------------------------------------------------
/BuildVariants/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\diana\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/androidTest/java/com/example/diana/buildvariants/ExampleInstrumentationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.buildvariants;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.filters.MediumTest;
6 | import android.support.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Instrumentation test, which will execute on an Android device.
16 | *
17 | * @see Testing documentation
18 | */
19 | @MediumTest
20 | @RunWith(AndroidJUnit4.class)
21 | public class ExampleInstrumentationTest {
22 | @Test
23 | public void useAppContext() throws Exception {
24 | // Context of the app under test.
25 | Context appContext = InstrumentationRegistry.getTargetContext();
26 |
27 | assertEquals("com.example.diana.buildvariants", appContext.getPackageName());
28 | }
29 | }
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/java/com/example/diana/buildvariants/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.buildvariants;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BuildVariants
3 |
4 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BuildVariants/app/src/test/java/com/example/diana/buildvariants/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.buildvariants;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/BuildVariants/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/BuildVariants/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/BuildVariants/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/BuildVariants/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/BuildVariants/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/BuildVariants/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/FreePaidApplication/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 | defaultConfig {
7 | minSdkVersion 15
8 | targetSdkVersion 23
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 |
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | productFlavors {
22 | free {
23 | applicationId "com.example.myapp.free"
24 | versionName "1.0-free"
25 | // this boolean can be accessed in java classes by using BuildConfig class
26 | // and now you can identify if your app is the paid version or not
27 | buildConfigField "boolean", "PAID_VERSION", "false"
28 | }
29 |
30 | paid {
31 | applicationId "com.example.myapp.paid"
32 | versionName "1.0-paid"
33 | buildConfigField "boolean", "PAID_VERSION", "true"
34 | }
35 | }
36 | }
37 |
38 | dependencies {
39 | compile fileTree(dir: 'libs', include: ['*.jar'])
40 | compile 'com.android.support:appcompat-v7:23.4.0'
41 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
42 | testCompile 'junit:junit:4.12'
43 | androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
44 | androidTestCompile 'com.android.support.test:runner:0.5'
45 | androidTestCompile 'com.android.support:support-annotations:23.4.0'
46 | }
47 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\diana\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/androidTest/java/com/example/diana/freepaidapplication/ExampleInstrumentationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.freepaidapplication;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.filters.MediumTest;
6 | import android.support.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Instrumentation test, which will execute on an Android device.
16 | *
17 | * @see Testing documentation
18 | */
19 | @MediumTest
20 | @RunWith(AndroidJUnit4.class)
21 | public class ExampleInstrumentationTest {
22 | @Test
23 | public void useAppContext() throws Exception {
24 | // Context of the app under test.
25 | Context appContext = InstrumentationRegistry.getTargetContext();
26 |
27 | assertEquals("com.example.diana.freepaidapplication", appContext.getPackageName());
28 | }
29 | }
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/free/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #9f3032
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/java/com/example/diana/freepaidapplication/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.freepaidapplication;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.TextView;
6 |
7 | public class MainActivity extends AppCompatActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 |
14 | TextView textView = (TextView) findViewById(R.id.text);
15 |
16 | if (BuildConfig.PAID_VERSION) {// this is the flag configured in build.gradle
17 | textView.setText("Is Paid Version");
18 | } else {
19 | textView.setText("Is Free Version");
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | FreePaidApplication
3 |
4 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/paid/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3fb592
4 | #369f30
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/FreePaidApplication/app/src/test/java/com/example/diana/freepaidapplication/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.diana.freepaidapplication;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/FreePaidApplication/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/FreePaidApplication/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/FreePaidApplication/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/FreePaidApplication/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/FreePaidApplication/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/FreePaidApplication/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/GSONSerializer/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/GSONSerializer/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GSONSerializer/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "ro.funcode.gsonserializer"
9 | minSdkVersion 9
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:22.1.1'
25 | compile 'com.google.code.gson:gson:2.2.4'
26 | }
27 |
--------------------------------------------------------------------------------
/GSONSerializer/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/catalinprata/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/androidTest/java/ro/funcode/gsonserializer/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.gsonserializer;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/java/ro/funcode/gsonserializer/MainActivity.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.gsonserializer;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.GsonBuilder;
11 |
12 | public class MainActivity extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_main);
18 |
19 | GsonBuilder gsonBuilder = new GsonBuilder();
20 | // make sure we use the custom Deserializer
21 | gsonBuilder.registerTypeAdapter(Sample.class, new SampleGSONParserAdapter());
22 |
23 | Gson gson = gsonBuilder.create();
24 | Sample sample = gson.fromJson("{\n" +
25 | " \"name\": \"some name\",\n" +
26 | " \"aNumber\": 233,\n" +
27 | " \"data\": {\n" +
28 | " \"aproperty\": \"aValue\",\n" +
29 | " \"subObject\": {\n" +
30 | " \"property\": \"otherValue\"\n" +
31 | " }\n" +
32 | " }\n" +
33 | "}", Sample.class);
34 |
35 | Log.e("test", sample.getData());
36 |
37 | }
38 |
39 | @Override
40 | public boolean onCreateOptionsMenu(Menu menu) {
41 | // Inflate the menu; this adds items to the action bar if it is present.
42 | getMenuInflater().inflate(R.menu.menu_main, menu);
43 | return true;
44 | }
45 |
46 | @Override
47 | public boolean onOptionsItemSelected(MenuItem item) {
48 | // Handle action bar item clicks here. The action bar will
49 | // automatically handle clicks on the Home/Up button, so long
50 | // as you specify a parent activity in AndroidManifest.xml.
51 | int id = item.getItemId();
52 |
53 | //noinspection SimplifiableIfStatement
54 | if (id == R.id.action_settings) {
55 | return true;
56 | }
57 |
58 | return super.onOptionsItemSelected(item);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/java/ro/funcode/gsonserializer/Sample.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.gsonserializer;
2 |
3 | /**
4 | * Created by catalinprata on 09/06/15.
5 | *
6 | * We have a JSON like this one:
7 | * {
8 | "name": "some name",
9 | "aNumber": 233,
10 | "data": {
11 | "aproperty": "aValue",
12 | "subObject": {
13 | "property": "otherValue"
14 | }
15 | }
16 | }
17 | *
18 | */
19 | public class Sample {
20 |
21 | private String name;
22 | private int aNumber;
23 | // keeps the String representation of the JSON object named "data"
24 | private String data;
25 |
26 | public String getData() {
27 | return data;
28 | }
29 |
30 | public void setData(String data) {
31 | this.data = data;
32 | }
33 |
34 | public int getaNumber() {
35 | return aNumber;
36 | }
37 |
38 | public void setaNumber(int aNumber) {
39 | this.aNumber = aNumber;
40 | }
41 |
42 | public String getName() {
43 | return name;
44 | }
45 |
46 | public void setName(String name) {
47 | this.name = name;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/java/ro/funcode/gsonserializer/SampleGSONParserAdapter.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.gsonserializer;
2 |
3 | import com.google.gson.JsonDeserializationContext;
4 | import com.google.gson.JsonDeserializer;
5 | import com.google.gson.JsonElement;
6 | import com.google.gson.JsonObject;
7 | import com.google.gson.JsonParseException;
8 |
9 | import java.lang.reflect.Type;
10 |
11 | /**
12 | * Created by catalinprata on 10/06/15.
13 | *
14 | * Deserializes the Sample object by keeping the jsonString JSON value as a string instead of parsing that too.
15 | */
16 | public class SampleGSONParserAdapter implements
17 | JsonDeserializer {
18 |
19 | @Override
20 | public Sample deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
21 |
22 | Sample sample = new Sample();
23 | JsonObject sampleJsonObject = json.getAsJsonObject();
24 |
25 | sample.setaNumber(sampleJsonObject.get("aNumber").getAsInt());
26 | sample.setName(sampleJsonObject.get("name").getAsString());
27 |
28 | // get the data object as a string
29 | sample.setData(sampleJsonObject.get("data").toString());
30 |
31 | return sample;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GSONSerializer/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GSONSerializer/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GSONSerializer/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GSONSerializer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | GSONSerializer
3 |
4 | Hello world!
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/GSONSerializer/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GSONSerializer/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GSONSerializer/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/GSONSerializer/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GSONSerializer/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/GSONSerializer/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jun 09 23:58:51 EEST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
7 |
--------------------------------------------------------------------------------
/GSONSerializer/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | println 'Library Module A handling start'
3 |
4 | // keep the type of the module (library or non library) into this custom variable
5 | ext.libModule = true
6 |
7 | apply plugin: 'android-library'
8 |
9 | //android {
10 | // compileSdkVersion 19
11 | // buildToolsVersion '19.0.3'
12 | // defaultConfig {
13 | // minSdkVersion 8
14 | // targetSdkVersion 19
15 | // versionCode 1
16 | // versionName "1.0"
17 | // }
18 | // buildTypes {
19 | // release {
20 | // runProguard false
21 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
22 | // }
23 | // }
24 | //
25 | //}
26 |
27 | dependencies {
28 | compile fileTree(dir: 'libs', include: ['*.jar'])
29 | compile 'com.android.support:appcompat-v7:19.+'
30 | }
31 |
32 | println 'Library Module A handling end'
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/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 C:/Users/catalin/Documents/androidstudio/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 | #}
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/java/ro/funcode/librarymodulea/librarymodulea/LibraryModuleAActivity.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.librarymodulea.librarymodulea;
2 |
3 | import android.support.v7.app.ActionBarActivity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 |
8 |
9 | public class LibraryModuleAActivity extends ActionBarActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_library_module_a);
15 | }
16 |
17 |
18 | @Override
19 | public boolean onCreateOptionsMenu(Menu menu) {
20 | // Inflate the menu; this adds items to the action bar if it is present.
21 | getMenuInflater().inflate(R.menu.library_module_a, menu);
22 | return true;
23 | }
24 |
25 | @Override
26 | public boolean onOptionsItemSelected(MenuItem item) {
27 | // Handle action bar item clicks here. The action bar will
28 | // automatically handle clicks on the Home/Up button, so long
29 | // as you specify a parent activity in AndroidManifest.xml.
30 | int id = item.getItemId();
31 | if (id == R.id.action_settings) {
32 | return true;
33 | }
34 | return super.onOptionsItemSelected(item);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleA/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/layout/activity_library_module_a.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/menu/library_module_a.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleA/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LibraryModuleA
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | println 'Library Module B handling start'
3 |
4 | // keep the type of the module (library or non library) into this custom variable
5 | ext.libModule = true
6 |
7 | apply plugin: 'android-library'
8 |
9 | //android {
10 | // compileSdkVersion 19
11 | // buildToolsVersion "19.0.3"
12 | //
13 | // defaultConfig {
14 | // minSdkVersion 8
15 | // targetSdkVersion 19
16 | // versionCode 1
17 | // versionName "1.0"
18 | // }
19 | // buildTypes {
20 | // release {
21 | // runProguard false
22 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
23 | // }
24 | // }
25 | //}
26 |
27 | dependencies {
28 | compile fileTree(dir: 'libs', include: ['*.jar'])
29 | compile 'com.android.support:appcompat-v7:19.+'
30 | }
31 |
32 | println 'Library Module B handling end'
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/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 C:/Users/catalin/Documents/androidstudio/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 | #}
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/java/ro/funcode/librarymoduleb/librarymoduleb/LibraryModuleBActivity.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.librarymoduleb.librarymoduleb;
2 |
3 | import android.support.v7.app.ActionBarActivity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 |
8 |
9 | public class LibraryModuleBActivity extends ActionBarActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_library_module_b);
15 | }
16 |
17 |
18 | @Override
19 | public boolean onCreateOptionsMenu(Menu menu) {
20 | // Inflate the menu; this adds items to the action bar if it is present.
21 | getMenuInflater().inflate(R.menu.library_module_b, menu);
22 | return true;
23 | }
24 |
25 | @Override
26 | public boolean onOptionsItemSelected(MenuItem item) {
27 | // Handle action bar item clicks here. The action bar will
28 | // automatically handle clicks on the Home/Up button, so long
29 | // as you specify a parent activity in AndroidManifest.xml.
30 | int id = item.getItemId();
31 | if (id == R.id.action_settings) {
32 | return true;
33 | }
34 | return super.onOptionsItemSelected(item);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/LibraryModuleB/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/layout/activity_library_module_b.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/menu/library_module_b.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/LibraryModuleB/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LibraryModuleB
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/build.gradle:
--------------------------------------------------------------------------------
1 | println 'MainModule handling start'
2 |
3 | // keep the type of the module (library or non library) into this custom variable
4 | ext.libModule = false
5 |
6 | apply plugin: 'android'
7 |
8 | //android {
9 | // compileSdkVersion 19
10 | // buildToolsVersion "19.0.3"
11 | //
12 | // defaultConfig {
13 | // minSdkVersion 8
14 | // targetSdkVersion 19
15 | // versionCode 1
16 | // versionName "1.0"
17 | // }
18 | // buildTypes {
19 | // release {
20 | // runProguard false
21 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
22 | // }
23 | // }
24 | //}
25 |
26 | dependencies {
27 | compile fileTree(dir: 'libs', include: ['*.jar'])
28 | compile 'com.android.support:appcompat-v7:19.+'
29 | compile project (':LibraryModuleA')
30 | }
31 |
32 | println 'MainModule handling end'
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/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 C:/Users/catalin/Documents/androidstudio/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 | #}
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/java/ro/funcode/gradleexample/mainmodule/MainActivity.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.gradleexample.mainmodule;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 |
10 | import ro.funcode.librarymodulea.librarymodulea.LibraryModuleAActivity;
11 |
12 |
13 | public class MainActivity extends ActionBarActivity {
14 |
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | setContentView(R.layout.activity_main);
19 |
20 | findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
21 | @Override
22 | public void onClick(View v) {
23 |
24 | // Open the library Activity
25 | startActivity(new Intent(MainActivity.this, LibraryModuleAActivity.class));
26 |
27 | }
28 | });
29 |
30 |
31 | }
32 |
33 |
34 | @Override
35 | public boolean onCreateOptionsMenu(Menu menu) {
36 | // Inflate the menu; this adds items to the action bar if it is present.
37 | getMenuInflater().inflate(R.menu.main, menu);
38 | return true;
39 | }
40 |
41 | @Override
42 | public boolean onOptionsItemSelected(MenuItem item) {
43 | // Handle action bar item clicks here. The action bar will
44 | // automatically handle clicks on the Home/Up button, so long
45 | // as you specify a parent activity in AndroidManifest.xml.
46 | int id = item.getItemId();
47 | if (id == R.id.action_settings) {
48 | return true;
49 | }
50 | return super.onOptionsItemSelected(item);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModule/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModule/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModule/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModule/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GradleExample
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModule/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/build.gradle:
--------------------------------------------------------------------------------
1 | println 'Secondary main module handling start'
2 |
3 | // keep the type of the module (library or non library) into this custom variable
4 | ext.libModule = false
5 |
6 | apply plugin: 'android'
7 |
8 | //android {
9 | // compileSdkVersion 19
10 | // buildToolsVersion "19.0.3"
11 | //
12 | // defaultConfig {
13 | // minSdkVersion 8
14 | // targetSdkVersion 19
15 | // versionCode 1
16 | // versionName "1.0"
17 | // }
18 | // buildTypes {
19 | // release {
20 | // runProguard false
21 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
22 | // }
23 | // }
24 | //
25 | //
26 | //
27 | //}
28 |
29 | dependencies {
30 | compile fileTree(dir: 'libs', include: ['*.jar'])
31 | compile 'com.android.support:appcompat-v7:19.+'
32 | }
33 |
34 | println 'Secondary main module handling end'
35 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/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 C:/Users/catalin/Documents/androidstudio/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 | #}
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/java/ro/funcode/mainmodulesecondary/mainmodulesecondary/MainModuleSecondary.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.mainmodulesecondary.mainmodulesecondary;
2 |
3 | import android.support.v7.app.ActionBarActivity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 |
8 |
9 | public class MainModuleSecondary extends ActionBarActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main_module_secondary);
15 | }
16 |
17 |
18 | @Override
19 | public boolean onCreateOptionsMenu(Menu menu) {
20 | // Inflate the menu; this adds items to the action bar if it is present.
21 | getMenuInflater().inflate(R.menu.main_module_secondary, menu);
22 | return true;
23 | }
24 |
25 | @Override
26 | public boolean onOptionsItemSelected(MenuItem item) {
27 | // Handle action bar item clicks here. The action bar will
28 | // automatically handle clicks on the Home/Up button, so long
29 | // as you specify a parent activity in AndroidManifest.xml.
30 | int id = item.getItemId();
31 | if (id == R.id.action_settings) {
32 | return true;
33 | }
34 | return super.onOptionsItemSelected(item);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/MainModuleSecondary/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/layout/activity_main_module_secondary.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/menu/main_module_secondary.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MainModuleSecondary
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/MainModuleSecondary/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Settings specified in this file will override any Gradle settings
5 | # configured through the IDE.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/GradleExample/GradleExample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/GradleExample/GradleExample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/GradleExample/GradleExample/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.10-all.zip
7 |
--------------------------------------------------------------------------------
/GradleExample/GradleExample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':MainModule', ':LibraryModuleA', ':LibraryModuleB', ':MainModuleSecondary'
2 |
--------------------------------------------------------------------------------
/JavaTCPServer/src/ro/kazy/tcp/Constants.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcp;
2 |
3 | /**
4 | * Description
5 | *
6 | * @author Catalin Prata
7 | * Date: 2/12/13
8 | */
9 | public class Constants {
10 |
11 | public static final String CLOSED_CONNECTION = "kazy_closed_connection";
12 | public static final String LOGIN_NAME = "kazy_login_name";
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/JavaTCPServer/src/ro/kazy/tcp/User.java:
--------------------------------------------------------------------------------
1 | package ro.kazy.tcp;
2 |
3 | /**
4 | * Encapsulates a user entity, having its port and username
5 | *
6 | * Created by catalin on 12/30/13.
7 | */
8 | public class User {
9 |
10 | private String username;
11 | private String message;
12 | private User userToSendMessage;
13 | private int userID;
14 |
15 | public User(String username, String message) {
16 | this.username = username;
17 | this.message = message;
18 | }
19 |
20 | public User() {
21 |
22 | }
23 |
24 | public int getUserID() {
25 | return userID;
26 | }
27 |
28 | public void setUserID(int userID) {
29 | this.userID = userID;
30 | }
31 |
32 | public String getUsername() {
33 | return username;
34 | }
35 |
36 | public void setUsername(String username) {
37 | this.username = username;
38 | }
39 |
40 | public String getMessage() {
41 | return message;
42 | }
43 |
44 | public void setMessage(String message) {
45 | this.message = message;
46 | }
47 |
48 | public User getUserToSendMessage() {
49 | return userToSendMessage;
50 | }
51 |
52 | public void setUserToSendMessage(User userToSendMessage) {
53 | this.userToSendMessage = userToSendMessage;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.1"
6 |
7 | defaultConfig {
8 | applicationId "ro.funcode.miscellaneous"
9 | minSdkVersion 22
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:23.0.1'
26 | }
27 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/catalinprata/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/androidTest/java/ro/funcode/miscellaneous/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.miscellaneous;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/java/ro/funcode/miscellaneous/expandable_list_view/ClassRoom.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.miscellaneous.expandable_list_view;
2 |
3 | import java.util.ArrayList;
4 |
5 | /**
6 | * Created by catalinprata on 12/10/15.
7 | */
8 | public class ClassRoom {
9 |
10 | private ArrayList mStudents;
11 | private String mName;
12 |
13 | public ClassRoom(ArrayList students, String name) {
14 | mStudents = students;
15 | mName = name;
16 | }
17 |
18 | public int numberOfStudents() {
19 | return mStudents == null ? 0 : mStudents.size();
20 | }
21 |
22 | public ArrayList getStudents() {
23 | return mStudents;
24 | }
25 |
26 | public void setStudents(ArrayList students) {
27 | mStudents = students;
28 | }
29 |
30 | public String getName() {
31 | return mName;
32 | }
33 |
34 | public void setName(String name) {
35 | mName = name;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/java/ro/funcode/miscellaneous/expandable_list_view/Student.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.miscellaneous.expandable_list_view;
2 |
3 | /**
4 | * Created by catalinprata on 12/10/15.
5 | */
6 | public class Student {
7 |
8 | private String mName;
9 | private int mAge;
10 |
11 | public Student(String name, int age) {
12 | mName = name;
13 | mAge = age;
14 | }
15 |
16 | public String getName() {
17 | return mName;
18 | }
19 |
20 | public void setName(String name) {
21 | mName = name;
22 | }
23 |
24 | public int getAge() {
25 | return mAge;
26 | }
27 |
28 | public void setAge(int age) {
29 | mAge = age;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/layout/activity_expandable_list_sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
20 |
21 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/layout/expandable_list_item_child.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
28 |
29 |
37 |
38 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/layout/expandable_list_item_parent.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
28 |
29 |
37 |
38 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Miscellaneous
3 |
4 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/app/src/test/java/ro/funcode/miscellaneous/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package ro.funcode.miscellaneous;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/Miscellaneous/Miscellaneous/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 12 19:28:38 EEST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
7 |
--------------------------------------------------------------------------------
/Miscellaneous/Miscellaneous/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/Miscellaneous/README.md:
--------------------------------------------------------------------------------
1 | funcodetuts
2 | ===========
3 |
4 | [](https://gitter.im/CatalinPrata/funcodetuts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5 |
6 | Funcode sample tutorials
7 | ------------------------
8 |
9 | [- Expandable list view](https://github.com/CatalinPrata/funcodetuts/tree/master/Miscellaneous/Miscellaneous/app/src/main/java/ro/funcode/miscellaneous/expandable_list_view)
10 |
--------------------------------------------------------------------------------
/NavigationViewTabs/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.0"
6 | defaultConfig {
7 | applicationId "com.example.navigationviewtabs"
8 | minSdkVersion 15
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:24.0.0'
28 | compile 'com.android.support:design:24.0.0'
29 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
30 | compile 'com.android.support:support-v4:24.0.0'
31 | testCompile 'junit:junit:4.12'
32 | }
33 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\diana\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/androidTest/java/com/example/navigationviewtabs/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.navigationviewtabs;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.navigationviewtabs", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
17 |
18 |
23 |
24 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/layout/fragment_container.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/layout/fragment_page.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/layout/nav_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/layout/recycler_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/menu/navigation_items.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 160dp
5 |
6 | 16dp
7 | 16dp
8 |
9 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NavigationViewTabs
3 |
4 | Open navigation drawer
5 | Close navigation drawer
6 |
7 |
8 | Hello blank fragment
9 |
10 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/NavigationViewTabs/app/src/test/java/com/example/navigationviewtabs/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.navigationviewtabs;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/NavigationViewTabs/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha6'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/NavigationViewTabs/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/NavigationViewTabs/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/NavigationViewTabs/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/NavigationViewTabs/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/NavigationViewTabs/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | funcodetuts
2 | ===========
3 |
4 | Funcode sample tutorials, you can find more on https://www.myandroidsolutions.com/
5 |
--------------------------------------------------------------------------------
/RealmResetSample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | dependencies {
4 | compile 'com.jakewharton:butterknife:7.0.0'
5 | compile 'io.realm:realm-android:0.81.1'
6 | compile 'com.jakewharton:process-phoenix:1.0.0'
7 | }
8 |
9 | android {
10 | compileSdkVersion 10
11 | buildToolsVersion '22.0.1'
12 |
13 | defaultConfig {
14 | applicationId 'com.realmreset.sample'
15 | minSdkVersion rootProject.ext.minSdkVersion
16 | targetSdkVersion rootProject.ext.compileSdkVersion
17 | versionCode 1
18 | versionName "1"
19 | }
20 |
21 | packagingOptions {
22 | exclude 'META-INF/services/javax.annotation.processing.Processor'
23 | }
24 |
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_7
27 | targetCompatibility JavaVersion.VERSION_1_7
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/java/com/realmreset/sample/ASuperActivity.java:
--------------------------------------------------------------------------------
1 | package com.realmreset.sample;
2 |
3 | import android.app.Activity;
4 | import android.content.BroadcastReceiver;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.content.IntentFilter;
8 | import android.os.Bundle;
9 |
10 | import io.realm.Realm;
11 |
12 | public class ASuperActivity extends Activity {
13 |
14 | protected Realm mRealm;
15 |
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 |
21 | mRealm = Realm.getInstance(this);
22 |
23 | }
24 |
25 | @Override
26 | protected void onDestroy() {
27 |
28 | mRealm.close();
29 |
30 | super.onDestroy();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/java/com/realmreset/sample/Activity2.java:
--------------------------------------------------------------------------------
1 | package com.realmreset.sample;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 |
6 | import butterknife.ButterKnife;
7 | import butterknife.OnClick;
8 |
9 | public class Activity2 extends ASuperActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_2);
15 |
16 | ButterKnife.bind(this);
17 | }
18 |
19 | @OnClick(R.id.new_activity)
20 | void openNewActivity() {
21 | startActivity(new Intent(Activity2.this, Activity3.class));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/java/com/realmreset/sample/Activity3.java:
--------------------------------------------------------------------------------
1 | package com.realmreset.sample;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 |
7 | import com.jakewharton.processphoenix.ProcessPhoenix;
8 |
9 | import butterknife.ButterKnife;
10 | import butterknife.OnClick;
11 |
12 | public class Activity3 extends ASuperActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_3);
18 | ButterKnife.bind(this);
19 | }
20 |
21 | @OnClick(R.id.restart)
22 | void restart() {
23 | final Intent nextIntent = new Intent(this, Activity3.class);
24 |
25 | mRealm.close();
26 |
27 | Handler handler = new Handler();
28 | handler.postDelayed(new Runnable() {
29 | @Override
30 | public void run() {
31 |
32 | ProcessPhoenix.triggerRebirth(Activity3.this);
33 |
34 | }
35 | }, 3000);
36 | }
37 |
38 | @OnClick(R.id.restart_with_intent)
39 | void restartWithIntent() {
40 |
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/java/com/realmreset/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.realmreset.sample;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.os.Process;
6 | import android.widget.TextView;
7 |
8 | import com.jakewharton.processphoenix.ProcessPhoenix;
9 |
10 | import butterknife.Bind;
11 | import butterknife.ButterKnife;
12 | import butterknife.OnClick;
13 |
14 | public final class MainActivity extends ASuperActivity {
15 | private static final String EXTRA_TEXT = "text";
16 |
17 | @Bind(R.id.process_id)
18 | TextView processIdView;
19 | @Bind(R.id.extra_text)
20 | TextView extraTextView;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 |
26 | setContentView(R.layout.activity_main);
27 | ButterKnife.bind(this);
28 |
29 | processIdView.setText("Process ID: " + Process.myPid());
30 | extraTextView.setText("Extra Text: " + getIntent().getStringExtra(EXTRA_TEXT));
31 | }
32 |
33 | @OnClick(R.id.restart)
34 | void restart() {
35 | ProcessPhoenix.triggerRebirth(this);
36 | }
37 |
38 | @OnClick(R.id.restart_with_intent)
39 | void restartWithIntent() {
40 | Intent nextIntent = new Intent(this, MainActivity.class);
41 | nextIntent.putExtra(EXTRA_TEXT, "Hello!");
42 | ProcessPhoenix.triggerRebirth(this, nextIntent);
43 | }
44 |
45 | @OnClick(R.id.new_activity)
46 | void openNewActivity() {
47 | startActivity(new Intent(MainActivity.this, Activity2.class));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/layout/activity_2.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
20 |
21 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/layout/activity_3.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
20 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/layout/activity_asuper.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
18 |
19 |
27 |
28 |
35 |
36 |
43 |
44 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/RealmResetSample/RealmResetModule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Activity2
3 |
4 | Hello world!
5 | Settings
6 | Activity3
7 | ASuperActivity
8 |
9 |
10 |
--------------------------------------------------------------------------------
/RealmResetSample/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:1.2.3'
7 | }
8 | }
9 |
10 | allprojects {
11 | repositories {
12 | mavenCentral()
13 | jcenter()
14 | }
15 | }
16 |
17 | ext {
18 | minSdkVersion = 15
19 | compileSdkVersion = 22
20 | buildToolsVersion = '22.0.1'
21 | }
22 |
--------------------------------------------------------------------------------
/RealmResetSample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/jw/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/RealmResetSample/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'RealmResetModule'
2 | include ':RealmResetModule'
3 |
--------------------------------------------------------------------------------
/TabsTutorial/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/TabsTutorial/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/TabsTutorial/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.example.tabstutorial"
9 | minSdkVersion 14
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:23.4.0'
25 | compile 'com.android.support:design:23.4.0'
26 | }
27 |
--------------------------------------------------------------------------------
/TabsTutorial/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Program Files (x86)\Android\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
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 | #}
18 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/androidTest/java/com/example/tabstutorial/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.example.tabstutorial;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/java/com/example/tabstutorial/Fragment1.java:
--------------------------------------------------------------------------------
1 | package com.example.tabstutorial;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Button;
10 |
11 |
12 | public class Fragment1 extends Fragment {
13 | private TabsListener tabsListener;
14 | /**
15 | * Use this factory method to create a new instance of
16 | * this fragment using the provided parameters.
17 | *
18 | * @return A new instance of fragment Fragment1.
19 | */
20 | public static Fragment1 newInstance() {
21 | return new Fragment1();
22 | }
23 |
24 | public Fragment1() {
25 | // Required empty public constructor
26 | }
27 |
28 | @Override
29 | public void onAttach(Activity activity) {
30 | super.onAttach(activity);
31 |
32 | if (activity instanceof TabsListener) {
33 | tabsListener = (TabsListener) activity;
34 | }
35 | }
36 |
37 | @Override
38 | public void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | }
41 |
42 | @Override
43 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
44 | Bundle savedInstanceState) {
45 | // Inflate the layout for this fragment
46 | View view = inflater.inflate(R.layout.fragment_fragment1, container, false);
47 |
48 | Button addTab = (Button) view.findViewById(R.id.button_add_tab);
49 | Button removeTab = (Button) view.findViewById(R.id.button_remove_tab);
50 |
51 | addTab.setOnClickListener(new View.OnClickListener() {
52 | @Override
53 | public void onClick(View v) {
54 | tabsListener.onTabAdded();
55 | }
56 | });
57 |
58 | removeTab.setOnClickListener(new View.OnClickListener() {
59 | @Override
60 | public void onClick(View v) {
61 | tabsListener.onTabRemoved();
62 | }
63 | });
64 |
65 | return view;
66 | }
67 | }
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/java/com/example/tabstutorial/Fragment2.java:
--------------------------------------------------------------------------------
1 | package com.example.tabstutorial;
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 | public class Fragment2 extends Fragment {
10 |
11 | /**
12 | * Use this factory method to create a new instance of
13 | * this fragment using the provided parameters.
14 | *
15 | * @return A new instance of fragment Fragment2.
16 | */
17 | public static Fragment2 newInstance() {
18 | return new Fragment2();
19 | }
20 |
21 | public Fragment2() {
22 | // Required empty public constructor
23 | }
24 |
25 | @Override
26 | public void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | }
29 |
30 | @Override
31 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
32 | Bundle savedInstanceState) {
33 | // Inflate the layout for this fragment
34 | return inflater.inflate(R.layout.fragment_fragment2, container, false);
35 | }
36 | }
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/java/com/example/tabstutorial/Fragment3.java:
--------------------------------------------------------------------------------
1 | package com.example.tabstutorial;
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 | public class Fragment3 extends Fragment {
10 |
11 | /**
12 | * Use this factory method to create a new instance of
13 | * this fragment using the provided parameters.
14 | @return A new instance of fragment Fragment3.
15 | */
16 | public static Fragment3 newInstance() {
17 | return new Fragment3();
18 | }
19 |
20 | public Fragment3() {
21 | // Required empty public constructor
22 | }
23 |
24 | @Override
25 | public void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | }
28 |
29 | @Override
30 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
31 | Bundle savedInstanceState) {
32 | // Inflate the layout for this fragment
33 | return inflater.inflate(R.layout.fragment_fragment3, container, false);
34 | }
35 | }
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/java/com/example/tabstutorial/TabsListener.java:
--------------------------------------------------------------------------------
1 | package com.example.tabstutorial;
2 |
3 | public interface TabsListener {
4 | void onTabAdded();
5 | void onTabRemoved();
6 | }
7 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-hdpi/fab_ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-hdpi/fab_ic_add.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-mdpi/fab_ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-mdpi/fab_ic_add.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-xhdpi/fab_ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-xhdpi/fab_ic_add.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-xxhdpi/fab_ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-xxhdpi/fab_ic_add.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/drawable-xxxhdpi/fab_ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/drawable-xxxhdpi/fab_ic_add.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/layout/fragment_fragment1.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
19 |
20 |
25 |
26 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/layout/fragment_fragment2.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/layout/fragment_fragment3.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 | 16dp
4 |
5 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TabsTutorial
3 |
4 | Hello world!
5 | Settings
6 |
7 |
8 | Hello blank fragment
9 |
10 |
--------------------------------------------------------------------------------
/TabsTutorial/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TabsTutorial/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/TabsTutorial/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/TabsTutorial/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CatalinPrata/funcodetuts/5b56d23730f748d06857d3f84d7011772fa46047/TabsTutorial/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/TabsTutorial/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jun 12 18:52:44 EEST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/TabsTutorial/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------