One-line font applying using Android-M data-binding doesn't work

Provided the above layout and setup, assuming following:

Inside your RecyclerView adapter you have bound the view by one of these ways:

  1. In onCreateViewHolder method of your adapter class

    @Override
    public MyAdapter.MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        ViewDataBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.recycler_item,
                parent, false);
        return new MyHolder(binding.getRoot());
    }
    
  2. Or in its onBindViewHolder method

        @Override
        public void onBindViewHolder(MyAdapter.MyHolder holder, int position) {
            DataBindingUtil.bind(holder.itemView);
            //...
        }
    

Following resource setup

Your assets folder should look similar to this:

assets folder

Your string resource file should have full qualified name for font:

<string name="kenyan">kenyan_rg.ttf</string>

With this ensured, it should work (and it does for me)