Dynamic Inflating Gives Me A Nullexception
I'm making a layout with a LinearLayout. This layout will have another layout inflated inside. Currently, I'm getting problems (nullexceptions) with that. My inflating code is the
Solution 1:
seems like "newGratLayout" view is null. Debug the code,so that you will get the idea.
Solution 2:
I've change the type of view to resolve the problem:
I had...
//View newGratLayout = LayoutInflater.from(getActivity()).inflate(R.layout.albaran_invoices_row, ll_invoices_layer, false);
And now I had...
RelativeLayoutnewGratLayout= (RelativeLayout)getActivity().getLayoutInflater().inflate(R.layout.albaran_invoices_row, null); //rl_albaran_invoices_row
Thank for the people how try to help me.
Post a Comment for "Dynamic Inflating Gives Me A Nullexception"