Open OtherOfIce opened 5 years ago
Hi! I need bind some values to the inner_view, but don't understand how to use it..
I have my ExpandableCardView in a fragment layout, and the inner_view is another layout, with a custom
I can't figure it out from here
Regards!
It worked for me! I could catch the syntax for java! Thxs!
FragmentStartBinding generalFragment = DataBindingUtil.inflate(inflater, R.layout.fragment_start, container, false);
GeneralLayoutBinding generalLayoutBinding = generalFragment.generalCard.BindToInnerView();
Hi Mblasi,
I need binding mechanism for expandable card View.
I am using as Java Library, Please would you share ExpandableCardView.java class ?
I couldn't implement data binding.
In layout file, I have 2 expandable cardview like that. How can I use databinding for innerviews.
<com.alespero.expandablecardview.ExpandableCardView android:id="@+id/exampleCardView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginTop="20dp" android:layout_marginBottom="10dp" app:title="ExpandableCardView1" android:textStyle="bold" app:inner_view="@layout/example1" app:titleColor="@color/colorPrimaryDark" app:headerBackgroundColor="@color/md_blue_100" app:expandOnClick="true" tools:ignore="MissingConstraints" />
<com.alespero.expandablecardview.ExpandableCardView
android:id="@+id/exampleCardView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:title="ExpandableCardView2"
android:textStyle="bold"
app:inner_view="@layout/example2"
app:titleColor="@color/colorPrimaryDark"
app:headerBackgroundColor="@color/md_blue_100"
app:expandOnClick="true"
tools:ignore="MissingConstraints" />
Thanks.
Added a function to the view that allows for databinding to be setup without exposing the view.
https://developer.android.com/topic/libraries/data-binding/