Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AndroidAnnotations/androidannotations-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>1.6_r2</version>
<version>4.1.1.4</version>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of {@link android.app.Fragment} in the doc of @FragmentById.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as i know we link to Android 1.6 for reason. I do not think we should change this because of the JavaDoc.

<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
import java.lang.annotation.Target;

/**
* <p>
* Methods annotated with @{@link AfterInject} will be called after the
* constructor is called in an enhanced class. Any code depending on injected
* fields should be done in an {@link AfterInject} annotated method.
* <p/>
* </p>
* <p>
* The method MUST have zero parameters.
* <p/>
* </p>
* <p>
* There MAY be several methods annotated with @{@link AfterInject} in the same
* class.
* <p/>
* </p>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,32 @@
*/
package org.androidannotations.annotations;

import android.text.Editable;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import android.text.Editable;

/**
* <p>
* This annotation is intended to be used on methods to receive events defined
* by {@link android.text.TextWatcher#afterTextChanged(Editable s)} after the
* text is changed on the targeted TextView or subclass of TextView.
* <p/>
* </p>
* <p>
* The annotation value should be one or several R.id.* fields that refers to
* TextView or subclasses of TextView. If not set, the method name will be used
* as the R.id.* field name.
* <p/>
* </p>
* <p>
* The method MAY have multiple parameter:
* </p>
* <ul>
* <li>A {@link android.widget.TextView} parameter to know which view has
* targeted this event
* <li>An {@link android.text.Editable} to make changes on modified text.
* targeted this event</li>
* <li>An {@link android.text.Editable} to make changes on modified text.</li>
* </ul>
* <p/>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,30 @@
*/
package org.androidannotations.annotations;

import android.app.Activity;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import android.app.Activity;

/**
* <p>
* Methods annotated with @{@link AfterViews} will be called after
* {@link Activity#setContentView(int)} is called by the generated activity.
* <p/>
* </p>
* <p>
* This occurs AFTER <code>setContentView(View)</code> which is called at the
* end of super.onCreate(). Any view depending code should be done in an
* {@link AfterViews} annotated method.
* <p/>
* </p>
* <p>
* The method MUST have zero parameters.
* <p/>
* </p>
* <p>
* There MAY be several methods annotated with @{@link AfterViews} in the same
* activity.
* <p/>
* </p>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
import java.lang.annotation.Target;

/**
* <p>
* Injects an {@link EApplication} annotated class in an enhanced class.
* <p/>
* </p>
* <p>
* Please check that your registered the application in the AndroidManifest.xml
* class prior to using this annotation.
* <p/>
* </p>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;

/**
* <p>
* Should be used on method that must be run in a background thread.
* <p/>
* </p>
* <p>
* The annotated method MUST return void and MAY contain parameters.
* <p/>
* The generated code is based on {@link BackgroundExecutor} methods.
*
* </p>
* <p>
* The generated code is based on {@link org.androidannotations.api.BackgroundExecutor} methods.
* </p>
*
* <h2>Cancellation</h2>
* <p>
* Since 3.0, you're able to cancel a background task by calling
* <code>BackgroundExecutor.cancelAll("id")</code> where "id" matches the
* {@link #id()} value.
*
* <p/>
* </p>
* <blockquote>
*
* <b>Example</b> :
Expand All @@ -58,28 +62,31 @@
* </pre>
*
* </blockquote>
* <p/>
* <p>
* <b>Note</b>: Cancellation may or may not be successful. If the task wasn't
* executed yet, it will be removed from the pool. But it could fail if task has
* already completed, has already been cancelled, or could not be cancelled for
* some other reason. See {@link Future#cancel(boolean)} for more information.
*
* </p>
*
* <h2>Execution flow</h2>
* <p>
* By default, all tasks will be put in a {@link ScheduledThreadPoolExecutor}
* with a core pool size of <code>2 * numberOfCpu</code>. Which means that
* background methods will be executed in <b>PARALLEL</b>. You can change this
* by calling <code>BackgroundExecutor.setExecutor(...)</code>.
*
* </p>
* <p>
* If you want execute ALL background methods SEQUENTIALLY, the best way is to
* change the executor of {@link BackgroundExecutor} to a
* change the executor of {@link org.androidannotations.api.BackgroundExecutor} to a
* {@link ScheduledThreadPoolExecutor} with a core pool size of <code>1</code>.
* <p/>
* </p>
* <p>
* If you want execute some background methods SEQUENTIALLY, you should simply
* use {@link #serial()} field. All task with the same serial key will be
* executed sequentially.
*
* <p/>
* </p>
*
* <blockquote>
*
* <b>Example 1</b> (all tasks executed sequentially) :
Expand Down Expand Up @@ -132,11 +139,13 @@
*
*
* <h2>Delay</h2>
* <p>
* Sometimes you may want to delay execution of a background method. To do so,
* you should use the {@link #delay()} field.
* <p/>
* </p>
* <b>Example</b> :
*
*
* <blockquote>
* <pre>
* &#064;EBean
* public class MyBean {
Expand All @@ -152,7 +161,7 @@
*
*
* @see UiThread
* @see BackgroundExecutor
* @see org.androidannotations.api.BackgroundExecutor
*/
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
Expand All @@ -166,11 +175,15 @@
* boolean mayInterruptIfRunning = true;
* BackgroundExecutor.cancelAll(&quot;my_background_id&quot;, mayInterruptIfRunning);
* </pre>
*
* @return the identifier for task cancellation
**/
String id() default "";

/**
* Minimum delay, in milliseconds, before the background task is executed.
*
* @return the minimum delay before execution
*/
int delay() default 0;

Expand All @@ -179,6 +192,8 @@
*
* All background tasks having the same <code>serial</code> will be executed
* sequentially.
*
* @return the serial execution group
**/
String serial() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
import java.lang.annotation.Target;

/**
* <p>
* Injects an {@link EBean} annotated class in an enhanced class.
* <p/>
* </p>
* <p>
* You can specify a specific implementation to inject using the value
* attribute.
* <p/>
* </p>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,32 @@
import java.lang.annotation.Target;

/**
* <p>
* This annotation is intended to be used on methods to receive events defined
* by
* {@link android.text.TextWatcher#beforeTextChanged(CharSequence s, int start, int count, int after)}
* before the text is changed on the targeted TextView or subclass of TextView.
* <p/>
* </p>
* <p>
* The annotation value should be one or several R.id.* fields that refers to
* TextView or subclasses of TextView. If not set, the method name will be used
* as the R.id.* field name.
* <p/>
* </p>
* <p>
* The method MAY have multiple parameters:
* </p>
* <ul>
* <li>A {@link android.widget.TextView} parameter to know which view has
* targeted this event
* targeted this event</li>
* <li>An {@link java.lang.CharSequence} parameter to get the text before
* modification.
* modification.</li>
* <li>An int parameter named start to get the start position of the modified
* text.
* <li>An int parameter named count to know the number of modified characters.
* text.</li>
* <li>An int parameter named count to know the number of modified characters.</li>
* <li>An int parameter named after to know the text length after the text
* modification.
* modification.</li>
* </ul>
* <p/>
*
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,26 @@
import java.lang.annotation.Target;

/**
* <p>
* This annotation is intended to be used on methods to receive events defined
* by
* {@link android.widget.CompoundButton.OnCheckedChangeListener#onCheckedChanged(android.widget.CompoundButton, boolean)}
* after the checked state is changed on the targeted CompoundButton or subclass
* of CompoundButton.
* <p/>
* </p>
* <p>
* The annotation value should be one or several R.id.* fields that refers to
* CompoundButton or subclasses of CompoundButton. If not set, the method name
* will be used as the R.id.* field name.
* <p/>
* </p>
* <p>
* The method MAY have multiple parameter:
* </p>
* <ul>
* <li>A {@link android.widget.CompoundButton} parameter to know which view has
* targeted this event
* <li>An {@link boolean} to know the new state of the view.
* targeted this event</li>
* <li>An {@link boolean} to know the new state of the view.</li>
* </ul>
* <p/>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
import java.lang.annotation.Target;

/**
* <p>
* This annotation is intended to be used on methods to receive events defined
* by {@link android.view.View.OnClickListener#onClick(android.view.View)} when
* the view has been clicked by the user.
* <p/>
* </p>
* <p>
* The annotation value should be one or several of R.id.* fields. If not set,
* the method name will be used as the R.id.* field name.
* <p/>
* </p>
* <p>
* The method MAY have one parameter:
* </p>
* <ul>
* <li>A {@link android.view.View} parameter to know which view has been clicked
* <li>A {@link android.view.View} parameter to know which view has been clicked</li>
* </ul>
* <p/>
* <blockquote>
*
* Example :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
import java.lang.annotation.Target;

/**
* <p>
* Use it on {@link EActivity} annotated classes to set a custom title layout.
* <p/>
* </p>
* <p>
* The annotation value is mandatory and should be one of R.layout.* fields.
* <p/>
* </p>
* <blockquote>
*
* Example :
Expand Down
Loading