can i set icon from server on TabLayout
using Picasso
library
private string path = \"192.168.0.102/project/a.png\";
TabLayout tabLayo
You can add a tab item with a custom view. Look at this.
See the following example:
private View createTabItemView(String imgUri) {
ImageView imageView = new ImageView(this);
TabLayout.LayoutParams params = new TabLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
imageView.setLayoutParams(params);
Picasso.get.load(imgUri).into(imageView);
return imageView;
}
Now, you can add tab items with a custom view.
tabLayout.addTab(tabLayout.newTab().setCustomView(createTabItemView("image URL")));