Skip to content

Commit 883b5b1

Browse files
committed
Minor cleaning
1 parent 510aa01 commit 883b5b1

5 files changed

Lines changed: 52 additions & 44 deletions

File tree

‎examples/HelloWorldEclipse/src/com/googlecode/androidannotations/helloworldeclipse/ActivityWithExtra.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ public class ActivityWithExtra extends Activity {
1919

2020
@ViewById
2121
TextView extraTextView;
22-
22+
2323
@Extra(MY_STRING_EXTRA)
2424
String myMessage;
25-
25+
2626
@Extra(MY_DATE_EXTRA)
2727
Date myDate;
28-
28+
2929
@Extra("unboundExtra")
3030
String unboundExtra = "unboundExtraDefaultValue";
31-
31+
3232
/**
3333
* The logs will output a classcast exception, but the program flow won't be interrupted
3434
*/
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
43
android:layout_width="fill_parent"
54
android:layout_height="fill_parent"
6-
>
7-
<EditText
8-
android:id="@+id/edit"
9-
android:layout_width="fill_parent"
10-
android:layout_height="wrap_content"
11-
android:hint="Enter your name"
12-
/>
13-
<Button
14-
android:id="@+id/button"
15-
android:layout_width="fill_parent"
16-
android:layout_height="wrap_content"
17-
android:text="Greet me!"
18-
/>
19-
</LinearLayout>
5+
android:orientation="vertical" >
6+
7+
<EditText
8+
android:id="@+id/edit"
9+
android:layout_width="fill_parent"
10+
android:layout_height="wrap_content"
11+
android:hint="Enter your name" />
12+
13+
<Button
14+
android:id="@+id/button"
15+
android:layout_width="fill_parent"
16+
android:layout_height="wrap_content"
17+
android:text="Greet me!" />
18+
19+
</LinearLayout>
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
4-
android:layout_width="fill_parent"
5-
android:layout_height="fill_parent">
6-
<TextView android:id="@+id/helloTextView"
7-
android:layout_width="fill_parent"
8-
android:layout_height="wrap_content"/>
9-
</LinearLayout>
3+
android:layout_width="fill_parent"
4+
android:layout_height="fill_parent"
5+
android:orientation="vertical" >
6+
7+
<TextView
8+
android:id="@+id/helloTextView"
9+
android:layout_width="fill_parent"
10+
android:layout_height="wrap_content" />
11+
12+
</LinearLayout>

‎examples/gradle/src/main/java/com/googlecode/androidannotations/gradle/activity/HelloAndroidActivity.java‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22

33
import java.util.Date;
44

5+
import org.androidannotations.annotations.AfterViews;
6+
import org.androidannotations.annotations.EActivity;
7+
import org.androidannotations.annotations.ViewById;
8+
import org.androidannotations.annotations.res.StringRes;
9+
510
import android.app.Activity;
611
import android.widget.TextView;
712

813
import com.googlecode.androidannotations.gradle.R;
914

1015
@EActivity(R.layout.main)
1116
public class HelloAndroidActivity extends Activity {
12-
@StringRes
13-
String hello;
17+
@StringRes
18+
String hello;
1419

15-
@ViewById
16-
TextView helloTextView;
20+
@ViewById
21+
TextView helloTextView;
1722

18-
@AfterViews
19-
void afterViews() {
20-
Date now = new Date();
21-
String helloMessage = String.format(hello, now.toString());
22-
helloTextView.setText(helloMessage);
23-
}
23+
@AfterViews
24+
void afterViews() {
25+
Date now = new Date();
26+
String helloMessage = String.format(hello, now.toString());
27+
helloTextView.setText(helloMessage);
28+
}
2429
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
43
android:layout_width="fill_parent"
54
android:layout_height="fill_parent"
6-
>
7-
<TextView
8-
android:id="@+id/helloTextView"
9-
android:layout_width="fill_parent"
10-
android:layout_height="wrap_content"
11-
/>
12-
</LinearLayout>
5+
android:orientation="vertical" >
6+
7+
<TextView
8+
android:id="@+id/helloTextView"
9+
android:layout_width="fill_parent"
10+
android:layout_height="wrap_content" />
11+
12+
</LinearLayout>

0 commit comments

Comments
 (0)