Skip to content

Commit d0574bb

Browse files
committed
Update README.md
1 parent 650e6d1 commit d0574bb

1 file changed

Lines changed: 1 addition & 39 deletions

File tree

README.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,14 @@
11

22

3-
43
"_The ratio of time spent reading [code] versus writing is well over 10 to 1 [therefore] making it easy to read makes it easier to write._" - **Robert C. Martin**
54

6-
#Is your Android code easy to write, read, and maintain?
7-
8-
```java
9-
@EActivity(R.layout.translate) // Sets content view to R.layout.translate
10-
public class TranslateActivity extends Activity {
11-
12-
@ViewById // Injects R.id.textInput
13-
EditText textInput;
14-
15-
@ViewById(R.id.myTextView) // Injects R.id.myTextView
16-
TextView result;
175

18-
@AnimationRes // Injects android.R.anim.fade_in
19-
Animation fadeIn;
206

21-
@Click // When R.id.doTranslate button is clicked
22-
void doTranslate() {
23-
translateInBackground(textInput.getText().toString());
24-
}
7+
## Test [![Android Annotations Logo](https://github.com/excilys/androidannotations/wiki/img/aa-logo.png)](https://github.com/excilys/androidannotations/wiki/Home) test
258

26-
@Background // Executed in a background thread
27-
void translateInBackground(String textToTranslate) {
28-
String translatedText = callGoogleTranslate(textToTranslate);
29-
showResult(translatedText);
30-
}
31-
32-
@UiThread // Executed in the ui thread
33-
void showResult(String translatedText) {
34-
result.setText(translatedText);
35-
result.startAnimation(fadeIn);
36-
}
37-
38-
// [...]
39-
}
40-
```
41-
42-
AndroidAnnotations provide those good things for **less than 50kb**, without any [perf impact](https://github.com/excilys/androidannotations/wiki/FAQ#wiki-perf-impact)!
439

4410
[![Android Annotations Logo](https://github.com/excilys/androidannotations/wiki/img/aa-logo.png)](https://github.com/excilys/androidannotations/wiki/GettingStarted) | [**Get Started**](https://github.com/excilys/androidannotations/wiki/GettingStarted), then [**read the cookbook**](https://github.com/excilys/androidannotations/wiki/Cookbook) |
4511
-----------|---------------|
4612

4713

4814

49-
***
50-
The project logo is based on the [Android logo](http://upload.wikimedia.org/wikipedia/commons/d/d7/Android_robot.svg), created and [shared by Google](http://code.google.com/policies.html) and used according to terms described in the [Creative Commons 3.0 Attribution License](http://creativecommons.org/licenses/by/3.0/).
51-
52-
Android is a trademark of Google Inc. Use of this trademark is subject to [Google Permissions](http://www.google.com/permissions/index.html).

0 commit comments

Comments
 (0)