1
I’m willing to put two things on the bar menu, but I have no idea how you do that. Whatsapp has two things on the menu bar, the contact name and the time that viewed Whatsapp.
Is there any way I can do that? Have two names on the bar menu?
My Mainactivity class
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ViewPager galeria = (ViewPager) findViewById(R.id.galeria);
GaleriaImagensAdapter adapter = null;
try {
adapter = new GaleriaImagensAdapter(this);
} catch (SQLException e) {
e.printStackTrace();
}
galeria.setAdapter(adapter);
}
There at the time of setting the image I was wanting to change the title and subtitle, using this setTitle and setSubtitle, has as?
Here I put the image
@Override
public Object instantiateItem(ViewGroup pager, int position) {
ImageView imagem = new ImageView(context);
imagem.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
try {
Class res = R.drawable.class;
Field field = res.getField(itens.get(position).nome_foto);
int drawableId = field.getInt(null);
imagem.setImageResource(drawableId);
}
catch (Exception e) {
Log.e("MyTag", "Failure to get drawable id.", e);
}
((ViewPager) pager).addView(imagem, 0);
return imagem;
}
By "wpp" you meant "Whatsapp"?
– Luídne
To
ActionBar
has a setTitle and setSubtitle. That’s what you mean?– Paulo Rodrigues
I’m wanting to do that image, but I don’t know how. This setSubtitle should work. how do I use it? Luidne and yes , shorthand
– Ilgner de Oliveira
Well, what has on Whatsapp is different than what you showed in the image. Whatsapp uses the
ActionBar
Android with a title and subtitle, which is simple. This image is something even more personalized.– Paulo Rodrigues
the image and to illustrate , I just need to have these two information
– Ilgner de Oliveira