Questions tagged [android-annotations]

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code that is easy to maintain.

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code.

  • This tag should contain questions related to the AndroidAnnotations framework
  • This tag should not contain general java annotation related questions, or annotation processing questions
  • This tag should not contain questions related to the Android Support Annotations library

Please start by reading the wiki and the mailing list

496 questions
8
votes
1 answer

Android-Annotations and inheritance

i am having trouble with android-annotations and inheritance: @EFragment(R.layout.fragment_foo) public class TestBaseFragment { @AfterViews public void afterTestBaseFragmentViews() { } } @EFragment(R.layout.fragment_foo) public class…
ligi
  • 39,001
  • 44
  • 144
  • 244
8
votes
2 answers

Is it possible to inject mocks for testing purposes with AndroidAnnotations?

I haven't found any examples on how to do this. I'm assuming it is not possible based on examples like this: @Bean(MyImplementation.class) MyInterface myInterface; where the class to inject is already determined.
jyoungdev
  • 2,674
  • 4
  • 26
  • 36
7
votes
2 answers

Using AndroidAnnotations with Scala and Gradle

Is it possible to use AndroidAnnotations with the Scala programming language and the Gradle build system? When I try to integrate AndroidAnnotations into my existing Android/Scala/Gradle project, then compilation fails because the generated…
W1M0R
  • 3,367
  • 3
  • 30
  • 32
7
votes
1 answer

Getting Android Studio, Gradle and Android Annotations working together

now that i've decided to use Android Annotations with Android Studio i wanted to implement it through Gradle. After some thoughtful research i've found out that there are older and newer ways of implementing Android Annotations through Gradle…
7
votes
1 answer

Use Android Annotations in custom dialog class

I'm using android annotations, I'm trying to annotate this class so that I can save a value into my shared preferences (annotated) class using @pref. I've managed to find a work around with an intent and a broadcast receiver however this is not…
Mike Bryant
  • 2,455
  • 9
  • 39
  • 60
7
votes
1 answer

AndroidAnnotations how to add init code after onCreate

If I have an activity defined as: @EActivity(R.layout.activity_login) public class LoginActivity extends Activity This will create the onCreate() method for me, but I have extra init code that I want to go after the onCreate method, how should I do…
Rocky Pulley
  • 22,531
  • 20
  • 68
  • 106
6
votes
1 answer

Android Annotations and new Android Databinding

When I activate the androidannotations apt line in my gradle build file, the data binding classes are no longer recognized. When I just comment out the "apt .." line then everything compiles again. Could it be that somehow the android-annotions…
Thomas Letsch
  • 930
  • 1
  • 8
  • 15
6
votes
1 answer

Configuring Android Annotations v3.0.1 with Android Studio (Beta) 0.8.4

Configuring Android Annotations is quite irksome. But I finally figured out a solution and wish to share with everyone.
6
votes
3 answers

How to send x-www-form-urlencoded in a body of POST request using android annotations and resttemplate

my interface looks as follows: @Rest(rootUrl = "https://myurl.com", converters = { GsonHttpMessageConverter.class }) public interface CommunicatonInterface { @Get("/tables/login") public Login login(Param param); public RestTemplate…
Vicek
  • 61
  • 1
  • 4
6
votes
3 answers

Inheritance activity with AndroidAnnotations

I have some trouble to build activities with AndroidAnnotations. I have a parent Activity named TemplateActivity: @EActivity(R.layout.activity_template) @NoTitle public class TemplateActivity extends Activity { // some views // ... …
ludriv
  • 291
  • 1
  • 6
  • 15
6
votes
1 answer

Adding arguments to AndroidAnnotation injected beans

I have a piece of code using AndroidAnnotations which is very similar to the one found at: https://github.com/excilys/androidannotations/wiki/Adapters-and-lists However - I want to pass an argument to the List adapter to specify which list -…
Silver
  • 4,911
  • 3
  • 15
  • 16
6
votes
1 answer

Android : Saripaar Validation Library. Need to set error message from strings.xml

I am using the the Saripaar validation library https://github.com/ragunathjawahar/android-saripaar to validate one of the forms. The library is pretty useful as it avoids a lot of boilerplate code for validating a form. However, the library uses…
Viren
  • 105
  • 2
  • 10
6
votes
2 answers

java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy after moving to Android Annotations v.2.7

I've got problems with building my project in eclipse after moving to Android Annotations v.2.7, at the same time maven build is ok. Here is stacktrace from eclipse Error log: Error Mon Nov 05 15:49:49 GMT+02:00 2012 Errors running builder 'Java…
zasadnyy
  • 2,107
  • 2
  • 19
  • 26
5
votes
1 answer

Kotlin issue when trying to cast "attachBadgeDrawable": This declaration is opt-in

I would use the BadgeDrawable in my Android app on a Button, the issue is that when i'm trying to set to the button layout the badgeDrawable via attachBadgeDrawable i get an error on it which says: his declaration is opt-in and its usage should be…
5
votes
3 answers

how to fix Android Annotations 4.6.0 compile with android Studio 3.5 and 3.5.0 gradle

I updated Android studio to 3.5 but there is a problem when I use android annotations Gradle may disable incremental compilation as the following annotation processors are not incremental: jetified-androidannotations-4.6.0.jar…
1 2
3
33 34