Giter Site home page Giter Site logo

android-templates-and-utilities's Introduction

Android Templates And Utilities

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 problems 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.

In this repo you can find templates for styling action bar, working with alarm manager, communicating with server API, sending and receiving broadcasts, working with database, creating dialogs, using dual pane layout, fragments, list fragments, GCM, geolocation, loading and caching images, working with intents, map, navigation drawer, showing notifications, preferences, running service, setting SSL connection, working with view pager, webview and much more. All templates were tested and should be compatible with Android 2, 3, 4.

Android Templates And Utilities are organized into 3 groups:

  • Base - basic skelet 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 the 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 has /src/fragment/ExampleFragment.java class which demonstrates how to use the template in Fragment.

Example

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

  • Create a new Android project with package name "com.example"
  • Add ic_launcher.png (Android Studio or Eclipse has generator for that)
  • Copy & paste Base
  • Copy & paste Res-Placeholder
  • Copy & paste Res-Strings
  • Copy & paste Res-Style (exclude _extras directory)
  • Copy & paste Src-Application-Class
  • Copy & paste Src-Config
  • Copy & paste Src-Fragment
  • Copy & paste Src-Logcat
  • Copy & paste Src-NetworkManager
  • Open SimpleActivity.java and comment out onCreateOptionsMenu(...) and onOptionsItemSelected(...) methods
  • Build the project and voilà, we have a basic skeleton for our future app

Developed by

Donate

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

petrnohejl avatar

Watchers

 avatar  avatar

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.