I access string resource in adapter. But I have a concern Which way to be usefull or better performance? First way seems like not usefull but does it create problems in terms of performance?
1;
Context context;
public Adapter(Context context){
this.context = context;
}
...
...
public void onBind(Holder holder,int position) {
holder.text.setText(context.getResources().getString(R.string.formText, position));
}
2;
Context context;
String formText;
public Adapter(Context context){
this.context = context;
this.formText= context.getResources().getString(R.string.formText);
}
...
...
public void onBind(Holder holder,int position) {
holder.text.setText(String.format(formText, position));
}