Skip to content

Commit 4b63413

Browse files
committed
Merge upstream changes
2 parents 9dcdf29 + 171e141 commit 4b63413

55 files changed

Lines changed: 1899 additions & 895 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
eclipse.preferences.version=1
22
encoding//src/main/java=UTF-8
33
encoding//src/main/java/rebel.xml=UTF-8
4+
encoding//src/main/resources=UTF-8
45
encoding//src/test/java=UTF-8
56
encoding/<project>=UTF-8

‎AndroidAnnotations/androidannotations-api/META-INF/MANIFEST.MF‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Export-Package: org.androidannotations.annotations,
88
org.androidannotations.annotations.rest,
99
org.androidannotations.annotations.sharedpreferences,
1010
org.androidannotations.api,
11+
org.androidannotations.api.builder,
1112
org.androidannotations.api.rest,
1213
org.androidannotations.api.sharedpreferences,
1314
org.androidannotations.api.view
Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
/**
2-
* Copyright (C) 2010-2014 eBusiness Information, Excilys Group
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5-
* use this file except in compliance with the License. You may obtain a copy of
6-
* the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed To in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13-
* License for the specific language governing permissions and limitations under
14-
* the License.
15-
*/
16-
package org.androidannotations.annotations;
17-
18-
import java.lang.annotation.ElementType;
19-
import java.lang.annotation.Retention;
20-
import java.lang.annotation.RetentionPolicy;
21-
import java.lang.annotation.Target;
22-
23-
/**
24-
* Use it on {@link EActivity} annotated classes to set a custom title layout.
25-
* <p/>
26-
* The annotation value is mandatory and should be one of R.layout.* fields.
27-
* <p/>
28-
* <blockquote>
29-
*
30-
* Example :
31-
*
32-
* <pre>
33-
* &#064;CustomTitle(R.layout.activityTitleLayout)
34-
* &#064;EActivity(R.layout.main)
35-
* public class MyActivity extends Activity {
36-
*
37-
* }
38-
* </pre>
39-
*
40-
* </blockquote>
41-
*/
42-
@Retention(RetentionPolicy.CLASS)
43-
@Target(ElementType.TYPE)
44-
public @interface CustomTitle {
45-
int value();
46-
}
1+
/**
2+
* Copyright (C) 2010-2014 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
package org.androidannotations.annotations;
17+
18+
import java.lang.annotation.ElementType;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
22+
23+
/**
24+
* Use it on {@link EActivity} annotated classes to set a custom title layout.
25+
* <p/>
26+
* The annotation value is mandatory and should be one of R.layout.* fields.
27+
* <p/>
28+
* <blockquote>
29+
*
30+
* Example :
31+
*
32+
* <pre>
33+
* &#064;CustomTitle(R.layout.activityTitleLayout)
34+
* &#064;EActivity(R.layout.main)
35+
* public class MyActivity extends Activity {
36+
*
37+
* }
38+
* </pre>
39+
*
40+
* </blockquote>
41+
*/
42+
@Retention(RetentionPolicy.CLASS)
43+
@Target(ElementType.TYPE)
44+
public @interface CustomTitle {
45+
int value();
46+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/**
2+
* Copyright (C) 2010-2014 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
package org.androidannotations.annotations;
17+
18+
import java.lang.annotation.ElementType;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
22+
23+
/**
24+
* Should be used on editor action listener methods in enhanced classes with view support
25+
*
26+
* The method may have some parameters amoung :
27+
* - a TextView
28+
* - an int : the actionId
29+
* - a KeyEvent
30+
*
31+
* The annotation value should be one of R.id.* fields. If not set, the method
32+
* name will be used as the R.id.* field name.
33+
*
34+
*/
35+
36+
/**
37+
* This annotation is intended to be used on methods to receive events defined
38+
* by
39+
* {@link android.widget.TextView.OnEditorActionListener#onEditorAction(android.widget.TextView, int, android.view.KeyEvent)}
40+
* when an action is performed on the editor.
41+
* <p/>
42+
* The annotation value should be one or several R.id.* fields that refers to
43+
* TextView or subclasses of TextView. If not set, the method name will be used
44+
* as the R.id.* field name.
45+
* <p/>
46+
* The method MAY have multiple parameter :
47+
* <ul>
48+
* <li>A {@link android.widget.TextView} parameter to know which view has
49+
* targeted this event
50+
* <li>An int parameter to get the actionId
51+
* <li>A {@link android.view.KeyEvent} parameter
52+
* </ul>
53+
* <p/>
54+
* <blockquote>
55+
*
56+
* Examples :
57+
*
58+
* <pre>
59+
* &#064;EditorAction(<b>R.id.helloTextView</b>)
60+
* void onEditorActionsOnHelloTextView(TextView hello, int actionId, KeyEvent keyEvent) {
61+
* // Something Here
62+
* }
63+
*
64+
* &#064;EditorAction
65+
* void <b>helloTextView</b>EditorAction(TextView hello) {
66+
* // Something Here
67+
* }
68+
*
69+
* &#064;EditorAction(<b>{R.id.editText, R.id.helloTextView}</b>)
70+
* void onEditorActionsOnSomeTextViews(TextView tv, int actionId) {
71+
* // Something Here
72+
* }
73+
*
74+
* &#064;EditorAction(<b>R.id.helloTextView</b>)
75+
* void onEditorActionsOnHelloTextView() {
76+
* // Something Here
77+
* }
78+
* </pre>
79+
*
80+
* </blockquote>
81+
*/
82+
@Retention(RetentionPolicy.CLASS)
83+
@Target(ElementType.METHOD)
84+
public @interface EditorAction {
85+
86+
int[] value() default ResId.DEFAULT_VALUE;
87+
88+
String[] resName() default "";
89+
90+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Copyright (C) 2010-2014 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
package org.androidannotations.annotations;
17+
18+
import java.lang.annotation.ElementType;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
import java.lang.annotation.Target;
22+
23+
/**
24+
* Use it on a {@link java.util.List} of {@link android.view.View} or {@link android.view.View} subtype
25+
* fields in a view related (ie {@link org.androidannotations.annotations.EActivity}, {@link org.androidannotations.annotations.EFragment},
26+
* {@link org.androidannotations.annotations.EViewGroup}, ...) annotated class.
27+
* <p/>
28+
* The annotation value should be an array of R.id.* fields.
29+
* <p/>
30+
* Your code related to injected views should go in an {@link org.androidannotations.annotations.AfterViews}
31+
* annotated method.
32+
* <p/>
33+
* <blockquote>
34+
*
35+
* Example :
36+
*
37+
* <pre>
38+
* &#064;EActivity(R.layout.main)
39+
* public class MyActivity extends Activity {
40+
*
41+
* // Injects R.id.myEditText
42+
* &#064;ViewsById({R.id.edit1, R.id.edit2})
43+
* List<EditText> myEditTexts;
44+
*
45+
* &#064;ViewsById({R.id.myTextView1, R.id.myOtherTextView})
46+
* List<TextView> textViews;
47+
*
48+
* &#064;AfterViews
49+
* void updateTextWithDate() {
50+
* for (TextView textView : textViews) {
51+
* textView.setText(&quot;Date: &quot; + new Date());
52+
* }
53+
* }
54+
* }
55+
* </pre>
56+
*
57+
* </blockquote>
58+
*
59+
* @see org.androidannotations.annotations.AfterViews
60+
*/
61+
@Retention(RetentionPolicy.CLASS)
62+
@Target(ElementType.FIELD)
63+
public @interface ViewsById {
64+
65+
int[] value() default ResId.DEFAULT_VALUE;
66+
67+
String[] resName() default "";
68+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright (C) 2010-2014 eBusiness Information, Excilys Group
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed To in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
package org.androidannotations.api.builder;
17+
18+
import android.app.Activity;
19+
import android.content.Context;
20+
import android.content.Intent;
21+
22+
public class ActivityIntentBuilder<I extends ActivityIntentBuilder<I>> extends IntentBuilder<I> {
23+
24+
public ActivityIntentBuilder(Context context, Class<?> clazz) {
25+
super(context, clazz);
26+
}
27+
28+
public ActivityIntentBuilder(Context context, Intent intent) {
29+
super(context, intent);
30+
}
31+
32+
public void start() {
33+
context.startActivity(intent);
34+
}
35+
36+
public void startForResult(int requestCode) {
37+
if (context instanceof Activity) {
38+
((Activity) context).startActivityForResult(intent, requestCode);
39+
} else {
40+
context.startActivity(intent);
41+
}
42+
}
43+
}

AndroidAnnotations/functional-test-1-5/src/main/java/org/androidannotations/test15/otto/Event.java renamed to AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/builder/Builder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package org.androidannotations.test15.otto;
17-
18-
public class Event {
16+
package org.androidannotations.api.builder;
1917

18+
public class Builder {
2019
}

0 commit comments

Comments
 (0)