Posts by Vinicius Lino • 102 points
8 posts
-
0
votes1
answer29
viewsA: Problems with checkbox in an android view Adapter
Try something like this seuCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {…
androidanswered Vinicius Lino 102 -
0
votes4
answers496
viewsA: Hide element from Activity
evento_btn.setVisibility(View.GONE); to "hide" the button and evento_btn.setVisibility(View.VISIBLE); to show the button again You can use if(evento_btn.getVisibility() == View.VISIBLE){…
androidanswered Vinicius Lino 102 -
0
votes1
answer59
viewsA: Androidstudio giving unusual error while opening project fonts
It seems to me that this is a layout file. You need to change its extension from .java for .xml and change the location of the file. You have to take it out of the package that is, and put it in the…
-
1
votes2
answers39
viewsA: how to pass an item from a listview to a textview in the same Activity
Try it like this: seuListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {…
-
0
votes1
answer480
viewsA: Syntax error on token "Else", delete this token
The mistake is in the first if... Has a ; there that should not exist
javaanswered Vinicius Lino 102 -
-1
votes1
answer36
viewsA: is it advisable to make java programs just by creating new classes within a single eclipse project?
It’s always better to create another project. First one is more organized. 2º that when you compile and generate the . project jar for implementation on some establishment or something like, you…
javaanswered Vinicius Lino 102 -
4
votes3
answers425
viewsA: Is it mandatory to put the same attributes on different constructors?
It is optional. It is only required when you set it as a parameter. You can have an empty constructor and assign values to attributes by calling the variable + set method. Example: Motociclo m = new…
-
0
votes2
answers2154
viewsA: Converting Int to String!
There are two ways to solve this problem: 1 - You can use the String.valueOf: id.setText(String.valueOf(elementos.get(position).getId())); 2 - You can use concatenation: id.setText("" +…