lamudi-gmbh / android-phone-field

A small library that allows you to create phone fields with corresponding country flags, and validate the phone number using libphonenumber from google.
Apache License 2.0
227 stars 67 forks source link

Tow way data binding #12

Open thair-jaber opened 6 years ago

thair-jaber commented 6 years ago

Hello, I'm using your library and i want to get the mobile number from PhoneInputLayout using tow way data binding, bellow the code:

  1. layout :
    <com.lamudi.phonefield.PhoneInputLayout
            android:id="@+id/phone_input_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="30dp"
            android:text="@={viewModel.phoneNumber}"
            android:visibility="@{viewModel.isPhoneNumberVisible ? View.VISIBLE : View.GONE}"
            android:textColorHint="@color/white"
            android:layout_marginRight="30dp"/>
  1. ViewModel: public ObservableField<String> phoneNumber = new ObservableField<>("");

i'm always getting Error:(18, 44) error: cannot find symbol class FragmentLoginBinding

Can you help please?