0
Basically I’m not getting to set the value in the field.
I’m doing so, I declared the variables:
Restaurante restaurante;
@ViewById
TextView nmRestaurante;
@ViewById
ImageView imgLogoRestaurante;
@ViewById
RatingBar ratingBar;
@ViewById
ListView lisComentarios;
@ViewById
LinearLayout lytEmptyComentarios;
List<Comentarios> lstComentarios;
GenericAdapter<Comentarios> adapter;
Then the method onCreate
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_comentarios);
restaurante = Globales.getRestauranteAtual();
View v = findViewById(R.id.toolbar_title);
nmRestaurante = (TextView) findViewById(R.id.nmRestaurante);
imgLogoRestaurante = (ImageView) findViewById(R.id.imgLogoRestaurante);
ratingBar = (RatingBar) findViewById(R.id.ratingBar);
lisComentarios = (ListView) findViewById(R.id.lisComentarios);
lytEmptyComentarios = (LinearLayout) findViewById(R.id.lytEmptyComentarios);
TextView toolbarTitle = (TextView) v;
toolbarTitle.setText(restaurante.getNomeRestaurante());
nmRestaurante.setText(restaurante.getNomeRestaurante());
Picasso.with(getApplicationContext()).load(restaurante.getUrlImagem()).into(imgLogoRestaurante);
ratingBar.setRating(Float.valueOf(String.valueOf(restaurante
.getMedia())));
carregarComentarios(restaurante.getCodigoRestaurante());
}
In no error log, and still the fields turn white
Probably
restaurante.getNomeRestaurante()
is returning aString
empty.. would have to see where you carry the entity..– Marco Giovanni
I used the
break point
and I saw that it was coming, I put in the variable restaurant aprti from hererestaurante = Globales.getRestauranteAtual();
 restaurante = Globales.getRestauranteAtual();
– Renan Rodrigues
Perhaps then the position of
TextView
is not appearing in the View, or is under some other component... tries to "set" a fixed text in theXML
and just load the layout withsetContentView
and see if it shows up...– Marco Giovanni
When Seto in XML it appears normally, then it is nothing blocking. this very strange all this...
– Renan Rodrigues