android-annotations

Rest API - how add custom headers?

那年仲夏 提交于 2021-02-19 04:33:05
问题 I want to make POST request with custom header. I can't find information how to do this using AA Rest API - https://github.com/excilys/androidannotations/wiki/Rest%20API . Should I use ClientHttpRequestInterceptor, which is used for authenticated requests? https://github.com/excilys/androidannotations/wiki/Authenticated-Rest-Client Thanks for any help! 回答1: There is currently an open issue for this : https://github.com/excilys/androidannotations/issues/323 For now, the only way to do this is

Android annotations: Different layout for portrait and landscape

放肆的年华 提交于 2021-02-11 17:58:43
问题 I am using AA and would like to specify two different xml layout files for portrait and landscape orientations. In my java class, marked as EActivity a method annotated with @Click is provided to respond to click event. Everything is working fine in portrait mode. But when the phone is rotated, the layout changes and buttons are not responding anymore. My guess is that the layout provided after @EActivity annotation is the portrait layout. How can I provide both portrait and landscape layouts

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

浪子不回头ぞ 提交于 2020-02-04 07:11:32
问题 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 (org.androidannotations:androidannotations:4.6.0). Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental I've put

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

拈花ヽ惹草 提交于 2020-02-04 07:09:24
问题 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 (org.androidannotations:androidannotations:4.6.0). Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental I've put

AndroidAnnotation with 2 productFlavors

徘徊边缘 提交于 2020-01-16 09:58:24
问题 I have 2 productFlavors in my project pone and ptwo like below: flavorDimensions "version" productFlavors { pone { applicationId android.defaultConfig.applicationId } ptwo { applicationId android.defaultConfig.applicationId + “.ptwo” } } sourceSets { pone { manifest.srcFile 'app/src/pone/AndroidManifest.xml' } ptwo { manifest.srcFile 'app/src/ptwo/AndroidManifest.xml' } } kapt { generateStubs = true arguments { arg( "resourcePackageName", android.defaultConfig.applicationId) } } Then I have

AndroidAnnotation with 2 productFlavors

旧时模样 提交于 2020-01-16 09:58:04
问题 I have 2 productFlavors in my project pone and ptwo like below: flavorDimensions "version" productFlavors { pone { applicationId android.defaultConfig.applicationId } ptwo { applicationId android.defaultConfig.applicationId + “.ptwo” } } sourceSets { pone { manifest.srcFile 'app/src/pone/AndroidManifest.xml' } ptwo { manifest.srcFile 'app/src/ptwo/AndroidManifest.xml' } } kapt { generateStubs = true arguments { arg( "resourcePackageName", android.defaultConfig.applicationId) } } Then I have

How to use an AndroidAnnotations SharedPref with a PreferenceActivity?

我的梦境 提交于 2020-01-15 03:56:10
问题 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 elsewhere? Is there a good way to do this without setting the value of each preference? Here is the activity code I'm currently using: public class SettingsActivity extends PreferenceActivity { @SuppressWarnings("deprecation") @Override public void

Android annotations and flavors in Android Studio 1.0.1

寵の児 提交于 2020-01-05 12:29:12
问题 i'm trying to add two flavors in my project, I already have android annotations and it's working fine without the favors, but when I'm adding the two favors the MainActivity_ class is generated only for one of the flavors when changeing the build variant. Any ideas on how could you add flavors and still use the annotations? Android annotations version is '3.2' My android section in gradle looks like this android { compileSdkVersion 21 buildToolsVersion "21.1.2" packagingOptions { exclude