xml - Android - DataBinding with Preference activity -


i set data binding in xml when go preference activity set binding cant. file data binding xml in called preference.xml assume there should generated class called preferencesbinding instead there not. should not auto generated ? code in preferenceactivity.java wont compile following:

    override      protected void oncreate(bundle savedinstancestate) {          super.oncreate(savedinstancestate);          preferencesbinding binding = databindingutil..... //what put here ??? preferenceactivity not activity           admin user = new admin(true);          binding.setuser(user);//this want           addpreferencesfromresource(r.xml.preferences);//this not necessary if can databinding work //..rest of code not important        } 

i starting think data binding not work preference screens, can ?

the preferences.xml file if neseccary looks this:

 <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:customns="http://schemas.android.com/apk/res/mypackage"     >     <data>         <variable name="admin" type="mypackage.administration"/>     </data>  <preferencescreen>  <!-- ....bunch of preferences ... --> </preferencescreen> </layout 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -