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
2
votes
1 answer

How to use an AndroidAnnotations SharedPref with a PreferenceActivity?

I have a PreferenceActivity that I'd like to use with AndroidAnnotations @SharedPref, so the PreferenceActivity would use the data in the @SharedPref. Is there a good way to do this? How do I tell the activity to to use @SharedPref I created…
Joe
  • 3,059
  • 2
  • 22
  • 28
1
vote
1 answer

how to create a very simple preference activity using android annotations?

I'm kinda new to android, I've heard about a new interesting project called androidannotations tried it and it was great, and didn't effect the app performance as it is a preprocessing lib so you can simply do…
Mustafa Abuelfadl
  • 537
  • 1
  • 4
  • 20
1
vote
1 answer

Add an Android annotation to a param of List for type-hinting

Normally, if we have a int parameter id to present a resource ID in Android. we could add annotations like @StringRes or @DrawableRes from androidx.annotation. So that IDE could use the information to check type for us, which is nice. Now, I have a…
Gasol
  • 2,319
  • 17
  • 27
1
vote
1 answer

ChecksSdkIntAtLeast is not working properly

I am trying to use @ChecksSdkIntAtLeast annotation to convert our java utility functions into kotlin properties that would not require @SuppressLint("NewApi"). But anyway I write the property, it stops red underlining code for both branches of…
Majkeee
  • 960
  • 1
  • 8
  • 28
1
vote
0 answers

What are the ramifications of non-final resource IDs in Android Gradle Plugin version 5.0 for Android Annotations?

Android Annotations relies heavily on resource IDs as annotation attributes. With each such attribute in code, the latest Android Studio issues a warning saying "Resource IDs will be non-final in Android Gradle Plugin version 5.0, avoid using them…
javaxian
  • 1,815
  • 1
  • 21
  • 26
1
vote
1 answer

is there any way of replace this code of this way?

I' am trying to replace this code: public void doThing(){ if(User.getInstance().isLoggin()){ ..... } } by this @withUser public void doThing(){ .... } I saw about the interceptors and annotation, but I cannot do it. Is this…
Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84
1
vote
1 answer

When do views get injected when using the AndroidAnnotations library?

I am wondering when @ViewById-annotated views are injected in AndroidAnnotations. Basically, I want to know if it is safe to access one of these views during onResume? I assume they are injected during onCreate but would like confirmation. Thank…
Snake
  • 14,228
  • 27
  • 117
  • 250
1
vote
1 answer

Annotations not converted properly after changing code from Java to Kotlin

After converting some Java code to Kotlin (to create a ReplacementSpan), an annotation-related error is returned. from in the @IntRange(from = 0) constructor returns an error: 'IntRange' is not an annotation class | Cannot find a parameter with…
wbk727
  • 8,017
  • 12
  • 61
  • 125
1
vote
2 answers

AndroidAnnotations + Instant App - The generated .R class cannot be found

I'm currently working on Android instant apps by using the android-topeka example project. Everything works as expected, after I'm using AndroidAnnotations on my Activity: @EActivity(resName = "activity_start") public class StartActivity extends…
1
vote
1 answer

Updating to AndroidStudio 3.2, when trying to build I get an issue: Could not find the AndroidManifest.xml file, using generation folder

The full problem is: error: Could not find the AndroidManifest.xml file, using generation folder [/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/app/build/generated/source/apt/debug]) This is how my build.gradle looks…
1
vote
1 answer

Are there tools to auto-generate Android POJO classes with Room Annotations

I have been using SqliteOpenHelper in Android for a long time. In complex projects when the schema is big and there are many relationships, I use an online tool to design the ERD, then it exports for me the SQL code that builds the DB tables with…
1
vote
1 answer

What can cause the error: Could not find the AndroidManifest.xml file?

The error: error: Could not find the AndroidManifest.xml file, using generation folder [C:\Users\valentin\Documents\work\aswaq\Android\Aswaq\utils\build\generated\source\apt\debug]) It worked until I made an update(don't remember what update) The…
1
vote
2 answers

AsyncTask.java cannot resolve symbol for Nullable, Mainthread, WorkerThread

I'm pretty new to android studio, but i got this error and i can't run my project. I saw a lot of answers which suggest to add the support-annotations dependency, but I'm using appcompat so i don't need that. Any thoughts?
1
vote
1 answer

Is it possible to add Android Thread Annotations to existing library methods?

I have not found any source which indicates that Android Annotations, like @UiThread, @WorkerThread, can be applied to library codes, for example, ActiveAndroid. I want to enforce that all ActiveAndroid related code to be called in worker thread,…
foresightyj
  • 2,006
  • 2
  • 26
  • 40
1
vote
0 answers

AndroidAnnotations not compatible with DataBinding since Android Studio 3.0

UPDATE It turned out that the issue is not with AndroidAnnotations. There is a bug in the gradle plugin 3.0 that does not find generated classes when compiling DataBinding views. There is an issue on the Android issuetracker. ORIGINAL POST After…