android-databinding Questions

10

Solved

I am using android's data binding library for views in a library project i have added the following line in my root gradle file classpath 'com.android.databinding:dataBinder:1.0-rc1' and have e...
Lillia asked 30/11, 2016 at 7:6

6

Solved

I am trying to replicate this answer: Setting attribute of child element of included layout I have a simple custom_edit_text.xml: <?xml version="1.0" encoding="utf-8"?> <layout xmlns:an...
Vaduz asked 12/3, 2019 at 3:55

4

Solved

Cannot understand... How to set some property of view only if variable field isn't null? For example <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.c...
Heilman asked 25/3, 2016 at 20:4

3

I have an abstract BaseActivity in my library module: @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Normal method to inflate th...

3

I will set editor action to edittext. My first code is @BindingAdapter("onEditorAction") fun bindOnEditorAction(view: TextView, event: () -> Unit) { view.setOnEditorActionListener { _...
Coreycorf asked 8/9, 2020 at 2:58

5

Solved

I just started to use Android Studio 3.0.0, but every time I try to build my project I get this error: Error:Circular dependency between the following tasks: :app:compileDebugKotlin +--- :app:data...

7

It was a working project in Android Studio, and today when I opened project it is showing below error for multiple BindingImpl classes. There are two types of error for every BindingImpl class. The...
Caucasia asked 8/10, 2021 at 13:39

36

Solved

I am using Data Binding in my project, when using <layout> and <data> in my xml binding class is not generated. For example i have activity_main.xml <?xml version="1.0" encoding="...
Syrinx asked 14/9, 2016 at 5:33

2

I am currently stuck on an error that continues to slow down the performance of my application. The error does not cause the application to close or crash, or to write an exception to the console. ...

16

Solved

I try to use Data Binding in my existing project, but I can't get it to build. Using in Project build.gradle: dependencies { classpath 'com.android.tools.build:gradle:1.3.1' //Data Binding Bet...
Inadmissible asked 26/10, 2015 at 10:25

1

I am aware that dataBinding requires an annotation processor (that is provided by kapt), is there anyway to use ksp for that purpose?
Redound asked 27/9, 2023 at 23:33

2

Solved

I'm using data binding within my app. I have an application module and the data binding is working successfully. However, I also have a 'home-module' I'm trying to use the same techniques, but the...
Thinnish asked 20/1, 2017 at 13:43

4

Solved

I want to use one of my layouts multiple times in the same view using include. Let's say I have a custom.xml including some TextViews. custom.xml: <LinearLayout xmlns:android="http://schemas...
Pomace asked 5/10, 2016 at 6:48

5

I've decided to use DataBinding library for my Android project. Are there any plugins/code templates available to install into Android Studio to get new Activity / Fragment etc added using Android ...
Parttime asked 3/7, 2017 at 14:51

6

Solved

I'm trying to set the visibility and the src of an ImageView using data binding. I don't know why this error is showing up, and I truely believe that this was working at one point, but I could be w...

7

Solved

I'm trying to use Android's Data Binding features with a custom adapter and a ListView. I'm having trouble overriding the custom adapter's getView method: public class ChecksAdapter extends ArrayAd...
Xeric asked 26/11, 2015 at 16:53

5

Solved

I use databinding to set the tint of my ImageView. And this is working well : android:tint="@{plantEntity.isFavorite ? @color/favorite : @color/favorite_none}" /> The problem is andro...
Hamforrd asked 29/11, 2020 at 9:1

22

Solved

I'm trying to use data-binding with Android. I can not anymore build my project. I got this error : "Error:(13, 46) error: package ch.company.project.databinding does not exist" Here my grad...
Angelus asked 26/11, 2015 at 8:58

13

Solved

I have a TextView which has a hardcoded string and I have a dynamic variable that I want to put at the end of this string. This is my code: <LinearLayout android:layout_width="match_parent" a...
Sedation asked 16/8, 2016 at 15:10

8

in my agent_details_activity.xml: <ImageView android:id="@+id/imageViewPhoto" android:layout_width="0dp" android:layout_height="400dp" app:agentImageUrl="@{item.url}" app:layout_constrain...
Volkslied asked 22/9, 2019 at 12:24

6

I am using Android Studio 3.0 Canary 6 version. I've enabled dataBinding in my class and the code doesn't show any error. But, when I build an APK, the build fails and shows the following error: E...

22

I have following fragment class written in Java using the new databinding library import com.example.app.databinding.FragmentDataBdinding; public class DataFragment extends Fragment { @Nullable...
Laceration asked 16/10, 2015 at 7:58

4

Solved

While using the new data binding api, I found that you can't bind to the "style" attribute. Compiler complains that it can't find the style. However, if I simply set the style as is, it'll find it ...
Nonscheduled asked 13/8, 2015 at 5:46

5

Solved

I'm working on an Android app using dataBinding and am currently trying to add the safe-args plugin, but after enabling the plugin, I can no longer get the root view via binding.root - Android Stud...
Message asked 23/10, 2019 at 5:55

13

I am currently using databinding and MVVM architecture for android. What would be the best way to get string resources in ViewModel. I am not using the new AndroidViewModel component, eventbus or...
Clustered asked 4/12, 2017 at 7:43

© 2022 - 2024 — McMap. All rights reserved.