Coder Social home page Coder Social logo

petrnohejl / android-templates-and-utilities Goto Github PK

View Code? Open in Web Editor NEW
1.1K 109.0 375.0 17.09 MB

Collection of source codes, utilities, templates and snippets for Android development.

Java 99.57% Batchfile 0.43%
android templates utilities snippets skeleton

android-templates-and-utilities's Introduction

Android Templates and Utilities [DEPRECATED]

Android Templates and Utilities are deprecated. I started with this project in 2012. Android ecosystem has changed a lot since then. There is a new programming language Kotlin, Android Jetpack components, RxJava and other technologies. These templates are written in Java and are not up to date.

Android Templates and Utilities is a collection of source codes, utilities, templates and snippets for Android development. It helps to build new apps and shows the best way how to implement certain things on Android platform.

I write these templates for my personal need. I use it almost every day for developing apps. It is something like cookbook for me. All my apps are based on these templates.

Note that all reusable utilities and classes have been moved to a new standalone library Alfonz. These templates use Alfonz as a dependency.

Content

In this repo you can find templates for styling app, handling activity result, working with alarm manager, animations, sending and receiving broadcasts, using dual pane layout, loading and caching images, working with intents, map, navigation drawer, showing notifications, working with parcelable, preferences, running service, setting SSL connection, timer, working with view pager, webview and much more. All templates were tested and should be compatible with Android 4.1 (API level 16).

Android Templates and Utilities are organized into 3 groups:

  • Base - basic skeleton of the Android project
  • Res - resource code including xml files, images
  • Src - source code including classes, resources

Usage

How to use these templates? Just copy a template into your project, rename package "com.example" to your own package name, rename classes' or resource's names if you want and customize the code to your needs. Some templates have /src/fragment/ExampleFragment.java class which demonstrates how to use the template in a Fragment.

Example

Example of creating a basic app skeleton with 1 Activity and 1 Fragment via Android Studio:

  • Create a new Android project with package name "com.example"
  • Copy & paste Base
  • Copy & paste Res-Placeholder
  • Copy & paste Res-Strings
  • Copy & paste Res-Theme
  • Copy & paste Src-Application-Class
  • Copy & paste Src-Config
  • Copy & paste Src-MVC-Activity
  • Copy & paste Src-MVC-Fragment
  • Add Alfonz dependencies in /mobile/build.gradle
  • Initialize Logcat utility inside ExampleApplication.onCreate(): Logcat.init(ExampleConfig.LOGS, "EXAMPLE");
  • Open ExampleActivity.java and comment out onCreateOptionsMenu(...) and onOptionsItemSelected(...) methods
  • Build the project and voilà, we have a basic MVC skeleton for our future app

Developed by

Petr Nohejl

License

Copyright 2012 Petr Nohejl

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-templates-and-utilities's People

Contributors

myronlee avatar nisrulz avatar petrnohejl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-templates-and-utilities's Issues

Discussion: Android Native Frameworks & Tools Review

This is not an issue. I apologize for using this medium but GitHub doesn't leave much choice for communication. Please feel free to close the issue at any time

I did a small research on the current Android RAD tools and frameworks. I included your project and I felt it's only fair to inform you and all the other projects generous developers of it:
http://andyonwheels.github.io/Android-Native-Frameworks-Review/

I hope that you see benefit from looking at what others are doing and such. If you have any feedback please do let me know.

I'm also trying to gauge the interest of the community in having/building something on a bigger scale. Not sure what that should be so I built an app a survey for it. I hope experienced Android devs such as yourself would take a look at. Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.