Giter Site home page Giter Site logo

android-guidelines's Introduction

Thank you for your interest in ribot’s development work. Unfortunately there are no current plans to make any changes to this project in the near future, and it is not being maintained or updated. We hope you still find this a useful resource and you can check out the newest recommendations in Android Jetpack for more ideas!

Android Guidelines

List of guidelines that we use at ribot when developing for the Android platform.

License

Copyright 2015 Ribot Ltd.

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-guidelines's People

Contributors

cdrussell avatar erlangp avatar eugenebrusov avatar fourlastor avatar gerardogtn avatar hitherejoe avatar iguure avatar jsonfry avatar jtbrinkmann avatar matthiaswenz avatar subsymbolic 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-guidelines's Issues

Event Bus Example

Could either this repo or the boiler plate repo include an example of how to properly use an event Bus following these guidelines? If there's already one there could someone point it out?

Missing License

We would like to use and expand these guidelines, unfortunately it is lacking a license so we can't do that legally.
Can you please add an OSS license like MIT or Apache?

Guideline about generic exceptions is misleading

Just FYI - The code guidelines comment about not catching generic exceptions actually refers to a link in the Android OS source guidelines. That is, it is a guideline about writing the operating system code, not generic Android applications.

It is appropriate to catch generic exceptions in your code in many places, such as the bottom of a network library's main entry or the loop of a game. Even the Android OS will catch Throwables at the bottom of their message loops; they just don't want a random developer to prevent those Throwables from not reaching said loops.

Otherwise, this guideline is encouraging application crashes for unknown errors.

That being said... it is an appropriate guideline that an Android application should not catch generic exceptions except at the "bottom" of such locations, and not in most places (to be fair, the example given is a good example of when not to catch generic exceptions).

What about item name in MENU files?

What about item(android:id) names in menu files?

Ex.: res/menu/activity_main.xml

<?xml version="1.0" encoding="utf-8"?>

<menu>
   <item android:id="@+id/HERE_IS_THE_NAME" android:title="@string/action_back"></item>
</menu>

?

Where should abstract methods go in terms of logical ordering?

Hello all

First, I am very thankful to those who wrote this guide, I have been looking to improve my coding standard and have been following this and thus far found it very useful .

I have a question regarding this section

https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md#2210-class-member-ordering

Where should abstract method declarations go in relation to ordering
For example in a base activity class

public abstract class BaseActivity extends AppCompatActivity implements FragmentManager.OnBackStackChangedListener {

    public abstract String getScreenNameForAnalytics();

}

Thanks for reading

Ersen

[Documentation] Wrong method call (typo)

Hi,
In section 2.2.14 Arguments in Fragments and Activities from project_and_code_guidelines.md in the method getStartIntent(), you call:
intent.putParcelableExtra(EXTRA_USER, user);
it must be:
intent.putExtra(EXTRA_USER, user);

Thank you very much for this repo!.

Regards,
Guillermo

[Documentation] Add hyperlinks to the libraries mentioned

While going through the architecture-guidelines documentation, I noticed that only Retrofit is a hyperlink and others like RxJava and Event Bus are not. I think adding links to their respective repositories and/or documentation will be helpful for beginners while reading the guidelines.

I'd like to take this up and update the documentation.

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.