495 questions
0 votes
1 answer
516 views
How to change text style when user presses on subtext in ClickableText in jetpack compose
I am implementing screen which shown terms and conditions text something like. By continuing you are agreeing to our terms of service. When user clicks on terms of service sub string I am ...
0 votes
0 answers
105 views
Find Java annotations via reflection for Kotlin getter
We have a wrapper class for checking the Android SDK version, and it uses the ChecksSdkIntAtLeast annotation. Here's a trimmed example of the class with just one getter and the logging removed: class ...
0 votes
1 answer
864 views
Android Bazel, "Check the visibility declaration of the former target if you think the dependency is legitimate"
I am new in Android developtment usign Bazel. I have put the @Keep annotation to prevent the obfuscation. To use it we need to import the library import androidx.annotation.Keep; In the project we'...
0 votes
1 answer
1k views
androidx.annotation.NonNull Cannot resolve symbol 'NonNull'
I have an issue after I deleted and updated some libraries from my project when I open any class that imports androidx.annotation.NonNull; I see error that Cannot resolve symbol 'NonNull' I do a ...
0 votes
1 answer
1k views
Android studio android annotation system api
I haven't built an app in android using this library before android.annotation.SystemApi, but my project now requires it. Is there something wrong in my import statement that prevents me from using ...
1 vote
1 answer
1k views
Add an Android annotation to a param of List<T> 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 ...
0 votes
0 answers
62 views
Does Android annotation inheritance is possible?
Let's say we have the following interfaces - @Retention(RetentionPolicy.SOURCE) @StringDef({EventA.EVENT}) public @interface EventA{ String EVENT= "eventA"; } @...
1 vote
1 answer
835 views
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 ...
5 votes
1 answer
8k views
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: ...
1 vote
0 answers
559 views
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 ...
16 votes
1 answer
1k views
Is there an annotation that denotes a max Android API version?
The annotation @RequiresApi is helpful for requiring that the annotated element is only called on the given API level or higher. However, there does not appear to be a corresponding annotation for ...
0 votes
1 answer
898 views
SerializedName annotated member is getting obfuscated in release build Android
In recent release build creation, one of my classes which had @SerializedName member was getting obfuscated, which didn't happen in previous release. My class: data class Segments( @...
0 votes
1 answer
174 views
use annotation click when button is created in onCreate
I want to add the @Click Android Annotation to button which is not defined in the layout.xml, but created in onCreate and added programmatically to a SearchView: @EActivity public class ...
-4 votes
3 answers
2k views
What this 'at'/'@' symbol means in Kotlin?
What do these annotations mean in this Kotlin code in android? @SuppressLint("SimpleDateFormat") fun convertLongToDateString(systemTime: Long): String { return SimpleDateFormat("EEEE MMM-dd-yyyy' ...
2 votes
1 answer
247 views
getOr, put() and edit() can not resolve in org.androidannotations:androidannotations
In one of my existing projects I already added the following libraries for use annotation shared preference def AAVersion = "4.6.0" dependencies { annotationProcessor "org.androidannotations:...