Update ListView after set new Value in an AlertDialog? - android

I have a problem to set a new value in my ListView after I saved it in the sharedPreferences.
On the picture you can see what I can see on my smartphone screen (easier to describe for me). If I press now the Item "Korrektur-Faktor" an AlertDialog opens and i can set a new Value.
If I now press save the new value (80) will be saved in the SharedPreferences but the value in the second Line of my ListViewItem will not be automatically updated.
Here some code:
String secLineCorrect = correctvalue.toString();
ValueSettings targetValue = new ValueSettings("Zielwert", "getTargetSharedPref"); //TODO
ValueSettings correctFactor = new ValueSettings("Korrektur-Faktor", secLineCorrect + " mg/dl pro 1IE");
//Füllen der ListView
final ArrayList<ValueSettings> valuesSettingsList = new ArrayList<>();
valuesSettingsList.add(targetValue);
valuesSettingsList.add(correctFactor);
final ValueSettingsListAdapter valuesSettingsAdapter = new ValueSettingsListAdapter(this, R.layout.settings_list_item_two_lines, valuesSettingsList);
lvValues.setAdapter(valuesSettingsAdapter);
//Klickbare Items
lvValues.setOnItemClickListener(new AdapterView.OnItemClickListener() {
#Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch(position){
//First Item in List
case 0:
Toast.makeText(SettingsActivity.this, "You clicked on: " + valuesSettingsList.get(position).getFirstLine() + "mit Item Nummer" + position, Toast.LENGTH_SHORT).show();
break;
//Second Item in List
case 1:
AlertDialog.Builder mBuilder = new AlertDialog.Builder(SettingsActivity.this);
View mView = getLayoutInflater().inflate(R.layout.dialog_correctfactor,null);
final EditText mCorrectFactor = (EditText) mView.findViewById(R.id.et_correct_factor_input);
Button mCancel = (Button) mView.findViewById(R.id.btn_cancel);
Button mSave = (Button) mView.findViewById(R.id.btn_save);
mBuilder.setView(mView);
final AlertDialog dialog = mBuilder.create();
dialog.show();
//Click on Cancel
mCancel.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View v){
Toast.makeText(SettingsActivity.this, "Abgebrochen. Kein neuer Wert eingespeichert!", Toast.LENGTH_SHORT).show();
}
});
//Click on Save
mSave.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View v) {
if(mCorrectFactor.getText().length() > 0){
correctvalue = Integer.parseInt(mCorrectFactor.getText().toString());
editor.putInt(correctValueKEY, correctvalue);
editor.commit();
Toast.makeText(getApplicationContext(), "1 IE entspricht " + correctvalue + " mg/dl.", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(getApplicationContext(), "Wert ist auf " + correctvalue + " md/dl gesetzt. Keine Änderung vorgenommen.", Toast.LENGTH_LONG).show();
}
dialog.cancel();
}
});
break;
}
}
});
As you can see I set the text in the beginning of the code. So every time I want that the new value I saved before is shown up, I have to go back into my main-Activity and start the settings-Activity new. But now I want that after i pressed save and the AlertDialog is closed, the new value is shown. I tried so much but never get a solution.
May someone can help me out :)

First you should make sure the saved value is reflected in the valuesSettingsList, as suggested by woodii.
You can then add this line after you save the new value:
valuesSettingsAdapter.notifyDataSetChanged();

For such features i can suggest PreferenceFragment or PreferenceActivity.
Anyway you can use SharedPreferences.OnSharedPreferenceChangeListener and override the method onSharedPreferenceChanged and update the Entry in the list accordingly.
Currently you only change the stored value in the SharedPreferences but not the visible value in the List.

Related

Checking empty of EditText and send Toast - / avoid saving empty data to SQLite

Sorry taking your time, am asked a question in a very wrong way.
So what I doing now, a small notepad program where the title and content saved of the note to the SQLite database.
This part working as should, but I don't have any input check and the app saving the note with empty title and content.
there is my current code for this :
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dba = new DatabaseHandler(MainActivity.this);
title = (EditText) findViewById(R.id.titleEditText);
content = (EditText) findViewById(R.id.wishEditText);
saveButton = (Button) findViewById(R.id.saveButton);
saveButton.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
saveToDB();
}
});
}
private void saveToDB() {
MyNote wish = new MyNote();
wish.setTitle(title.getText().toString().trim());
wish.setContent(content.getText().toString().trim());
dba.addWishes(wish);
dba.close();
//clear
title.setText("");
content.setText("");
Intent i = new Intent(MainActivity.this, DisplayNotesActivity.class);
startActivity(i);
How can I implement a basic input checking and avoid the saving of empty notes?
my first idea was to check the emptiness of the input and drop a toast message, tried several solutions from not, but not worked me.
many thanks
C
You have to be sure you're using the same EditText variable which in this case I think is title.
EditText title = (EditText) findViewById(R.id.titleEditText);
if(title.getText().toString().isEmpty()) {
Toast.makeText(MainActivity.this, "Input Text Is Empty.. Please Enter Some Text", Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(MainActivity.this, title.getText().toString(), Toast.LENGTH_SHORT).show();
}
}
});
U need to specyfi your question.
But from what i undestood u don't know how check editText is empty and don't know why can't write into text box.
First easy method is just check length of string if it bigger than 0 that's meen it's not empty
EditText title = (EditText) findViewById(R.id.IDEDITTEXT);
if(String.valueOf(title.getText()).length()>0){
//do something
}else{
//do something
}
And about second (i thing question) is check your xml file (layout) does your editText is enabled and not is textViev.
Btw your code is hard to read like your question:)
EditText title = (EditText) findViewById(R.id.titleEditText);
if(title.getText().toString().length()<=0) {
Toast.makeText(MainActivity.this, "Input Text Is Empty.. Please Enter Some Text", Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(MainActivity.this, title.getText().toString(), Toast.LENGTH_SHORT).show();
}
}
});
try this code...

Can't use an array for switch case

I have an array created in my strings file(in values folder).
Now i want to use it for choosing on spinner, using switch case.
something like that:
ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line,workers);
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(this);
public void addUser(View view) {
switch (Arrays.toString(workers)){
case workers[0]: //this option isn't compiling
Waiter waiter = new Waiter();
waiter.setName(editName.getText().toString());
waiter.setLast(editLast.getText().toString());
waiter.setPass(editPass.getText().toString());
name = editName.getText().toString();
last = editLast.getText().toString();
passId = Integer.parseInt(editPass.getText().toString());
break;
case workers[1]:
break;
}
and so on..
EDIT:
tried now with if statement, this method should add me new workers on button press, but after that when i press the button nothing happens:
public void addUser(View view) {
if(Arrays.toString(workers).equals(workers[0])) {
Waiter waiter = new Waiter();
SQLiteDatabase usersDB = openOrCreateDatabase("USERES_DATABSE.sqlite", MODE_PRIVATE, null);
usersDB.execSQL("CREATE TABLE IF NOT EXISTS users_table (name TEXT, last TEXT, pass INTEGER)");
waiter.setName(editName.getText().toString());
waiter.setLast(editLast.getText().toString());
waiter.setPass(editPass.getText().toString());
name = editName.getText().toString();
last = editLast.getText().toString();
passId = Integer.parseInt(editPass.getText().toString());
if (editName.getText().toString().isEmpty() ||
editLast.getText().toString().isEmpty() ||
editPass.getText().toString().isEmpty()) {
AlertDialog alertDialog = new AlertDialog.Builder(UserCreatingActivity.this).create();
alertDialog.setTitle("Oops,");
alertDialog.setMessage("You forgot to fill something");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
}
});
alertDialog.show();
} else {
usersDB.execSQL("INSERT INTO users_table VALUES('" + name + "','" + last + "','" + passId + "')");
AlertDialog alertSucsess = new AlertDialog.Builder(UserCreatingActivity.this).create();
alertSucsess.setTitle("Congrats,");
alertSucsess.setMessage(name + " " + last + " Has been created");
alertSucsess.setButton("OK", new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
startActivity(new Intent(getApplicationContext(), MainActivity.class));
}
});
alertSucsess.show();
}
usersDB.close();
// ADDING SHIFT MANAGER
} else if (Arrays.toString(workers).equals(workers[1])){
You can not use variables in a switch. Change to if.
Or you can change to case 0:, case 1:, case 2: since it's always workers[]
case expressions must be constant values.
If possible values of workers are predefined, use these predefined and constant values as case expressions, instead.
A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Enum Types), the String class, and a few special classes that wrap certain primitive types: Character, Byte, Short, and Integer (discussed in Numbers and Strings)
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
You can't make the cases variables. The switch is fine as is. Just change the cases to constants.
If this is unworkable then you must do as Alex advises and resort to if statements, which in many cases result in fewer lines of code.
For example
if (Arrays.toString(workers).equals(workers[0])) {
Waiter waiter = new Waiter();
waiter.setName(editName.getText().toString());
waiter.setLast(editLast.getText().toString());
waiter.setPass(editPass.getText().toString());
name = editName.getText().toString();
last = editLast.getText().toString();
passId = Integer.parseInt(editPass.getText().toString());
}
I think there is an error in your logic but can't be more specific without more code.
As everyone mentioned you cannot use arrays with the switch so you are going for the if. And the way you have written condition seems incorrect if(Arrays.toString(workers).equals(workers[0])). After going through question then based on the selection in the spinner you have to add user...correct me if I am wrong. So first you need to find the value of spinner.
Solution1
Create a instance String variable and implement onItemSelected as follows.
String workerSelected;
//your code
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
#Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int position, long arg3) {
workerSelected=worker[position]
}
#Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
OR
Since you have added spinner.setOnItemSelectedListener(this); then just directly override method i.e following code is enough
#Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int position, long arg3) {
workerSelected=worker[position]
}
And then inside addUser method you can for if condition as
if(workerSelected.equals(worker[0])){
//your code
}else if(workerSelected.equals(worker[1])){
//your code
}
Solution2
Directly inside your addUser method
String workerSelected = spinner.getSelectedItem().toString();
if(workerSelected.equals(worker[0])){
//your code
}else if(workerSelected.equals(worker[1])){
//your code
}

OnClickListener for Dynamically created buttons

I'm new to android Development and I hope you can help me.I created Buttons Dynamically ( Based on the contents of my Database). I also made onclicklistener for those buttons. The problem now is, If I click the buttons, Nothing happens. There is also no error shown in logcat. Why do you think this happened? Any response will be appreciated.
Here is my code on creating buttons:
final LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
cursorCol = scoresDataBaseAdapter.queueCrit(mRowId);
for(cursorCol.move(0); cursorCol.moveToNext(); cursorCol.isAfterLast()){
int Id = Integer.parseInt(cursorCol.getString(cursorCol.getColumnIndex("_id")));
Log.i("_id","_id : "+Id);
String CriteriaButton = cursorCol.getString(cursorCol.getColumnIndex("Criteria"));
Log.i("CriteriaButton","CriteriaButton : " + CriteriaButton);
Button btn = new Button(this);
btn.setText(" " + CriteriaButton + " ");
btn.setId(Id);
btn.setTextColor(Color.parseColor("#ffffff"));
btn.setTextSize(12);
btn.setPadding(10, 10, 10, 10);
btnlayout.addView(btn,params);
btn.setOnClickListener(getOnClickDoSomething(btn));}
Now after my OnCreate, I have the following method to set the onclicklistener
View.OnClickListener getOnClickDoSomething(final Button button) {
return new View.OnClickListener() {
public void onClick(View v) {
String criteria = button.getText().toString();
if ("Exams".equals(criteria)){
Toast.makeText(getApplicationContext(),"Exams Selected",2).show(); }
else if ("Quizzes".equals(criteria)){
Toast.makeText(getApplicationContext(),"Quizzes Selected",2).show(); }
}
};
}
Change
String criteria = button.getText().toString();
to
String criteria = button.getText().toString().trim();
Inside onClick method use View parameter of onClick method to get Text from pressed button as:
public void onClick(View v) {
Button button = (Button)v;
String selectedText = button.getText().toString();
....your code here
}

Android: Save State of Radio Buttons

Hi I'm trying to create an app for Android and in order to develop it i need to navigate through different pages and questions. For this task I have defined a radiogroup with some radiobuttons. What I want to obtain is each question answered radiobutton and when the user goes thorugh differentes pages the value can be retrieved. I have tried this code that consists of that if there is one selected radiobutton, there arent created new radiobuttons (radiobuttons checked false). However with this code, there is always a selected answer so there is always the same radiobutton selected. I will appreciate some help.
radBotA.setOnCheckedChangeListener(radioCheckChangeListener);
radBotB.setOnCheckedChangeListener(radioCheckChangeListener);
radBotC.setOnCheckedChangeListener(radioCheckChangeListener);
radBotD.setOnCheckedChangeListener(radioCheckChangeListener);
radBotA.setOnClickListener(radioClickListener);
radBotB.setOnClickListener(radioClickListener);
radBotC.setOnClickListener(radioClickListener);
radBotD.setOnClickListener(radioClickListener);
if (radBotA.isChecked()){
Answers[position]="A";
}
else if(radBotB.isChecked()){
Answers[position]="B"; }
else if(radBotB.isChecked()){
Answers[position]="C"; }
else if(radBotC.isChecked()){
Answers[position]="D"; }
else if(radBotD.isChecked()){
Answers[position]="D"; }
else {
radBotA.setChecked(false);
radBotA.setChecked(false);
radBotA.setChecked(false);
radBotA.setChecked(false);
}
bPrevious.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
position = position -1;
questions.Previous();
currentQuestion();
}
});
bNext.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View v) {
position = position +1;
questions.Next();
currentQuestion();
}
});
private void currentQuestion() {
if (position==0){
bPrevious.setVisibility(View.GONE);
}else{
bPrevious.setVisibility(View.VISIBLE);
}
if (position==nPreguntas-1){
bNext.setVisibility(View.GONE);
}else{
bNext.setVisibility(View.VISIBLE);
}
questions.currentQuestion(this, category);
enunciado.setImageResource(Enunciado[position]);
pregunta.setText(questions.getPregunta());
final RadioButton radBotA = new RadioButton(this);
final RadioButton radBotB = new RadioButton(this);
final RadioButton radBotC = new RadioButton(this);
final RadioButton radBotD = new RadioButton(this);
radBotA.setText("A. " + questions.getRespuestaA());
radBotB.setText("B. " + questions.getRespuestaB());
radBotC.setText("C. " + questions.getRespuestaC());
radBotD.setText("D. " + questions.getRespuestaD());
String nprueba = "Item " + questions.getId() + " de "+ nPreguntas;
NombrePrueba.setText(nprueba);
if (radBotA.isChecked()){
Answers[position]="A";
}
else if(radBotB.isChecked()){
Answers[position]="B"; }
else if(radBotB.isChecked()){
Answers[position]="C"; }
else if(radBotC.isChecked()){
Answers[position]="D"; }
else if(radBotD.isChecked()){
Answers[position]="D"; }
else {
radBotA.setChecked(false);
radBotA.setChecked(false);
radBotA.setChecked(false);
radBotA.setChecked(false);
}
}
thank you all for your time
Edit:
public void save(){
SharedPreferences settings = getSharedPreferences("Answers", 0);
SharedPreferences.Editor e = settings.edit();
e.putBoolean("A0",radBotA.isChecked());
e.putBoolean("B0",radBotB.isChecked());
e.putBoolean("C0",radBotC.isChecked());
e.putBoolean("D0",radBotD.isChecked());
e.putBoolean("A1",radBotA.isChecked());
e.putBoolean("B1",radBotB.isChecked());
e.putBoolean("C1",radBotC.isChecked());
e.putBoolean("D1",radBotD.isChecked());
e.putBoolean("A2",radBotA.isChecked());
e.putBoolean("B2",radBotB.isChecked());
e.putBoolean("C2",radBotC.isChecked());
e.putBoolean("D2",radBotD.isChecked());
e.putBoolean("A3",radBotA.isChecked());
e.putBoolean("B3",radBotB.isChecked());
e.putBoolean("C3",radBotC.isChecked());
e.putBoolean("D3",radBotD.isChecked());
public void load(){
SharedPreferences settings = getSharedPreferences("Answers", 0);
boolean answerA0 = settings.getBoolean("A0", false);
boolean answerB0 = settings.getBoolean("B0", false);
boolean answerC0 = settings.getBoolean("C0", false);
boolean answerD0 = settings.getBoolean("D0", false);
boolean answerA1 = settings.getBoolean("A1", false);
boolean answerB1 = settings.getBoolean("B1", false);
boolean answerC1 = settings.getBoolean("C1", false);
boolean answerD1 = settings.getBoolean("D1", false);
boolean answerA2 = settings.getBoolean("A2", false);
boolean answerB2 = settings.getBoolean("B2", false);
boolean answerC2 = settings.getBoolean("C2", false);
boolean answerD2 = settings.getBoolean("D2", false);
boolean answerA3 = settings.getBoolean("A3", false);
boolean answerB3 = settings.getBoolean("B3", false);
boolean answerC3 = settings.getBoolean("C3", false);
boolean answerD3 = settings.getBoolean("D3", false);
However I don't know how to continue. I v' thinking about the following code but it gives me error and where posicion is the "Page Number":
public void Test(){
switch(posicion){
case(0):
if(answerA0==true){
e.putBoolean("A0",radBotA.isChecked());
}
}
}
}
If I understand you correctly, you want to retrieve some data in other activities. In that case the easiest way would be to use SharedPreferences.
After user answers the question (CheckBox's check state is being changed) you should store your information in SharedPreferences like this:
SharedPreferences settings = getSharedPreferences("Answers", 0); // first argument is just a name of your SharedPreferences which you want to use. It's up to you how you will name it, but you have to use the same name later when you want to retrieve data.
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean("questionA", radBotA.isChecked()); // first argument is a name of a data that you will later use to retrieve it and the second argument is a value that will be stored
editor.putBoolean("questionB", radBotB.isChecked());
editor.putBoolean("questionC", radBotC.isChecked());
editor.putBoolean("questionD", radBotD.isChecked());
editor.commit(); // Commit the changes
So now you have those information stored in your internal storage. In other activity, you can retrieve this information:
SharedPreferences settings = getSharedPreferences("Answers", 0);
boolean answerA = settings.getBoolean("questionA", false); // The second argument is a default value, if value with name "questionA" will not be found
boolean answerB = settings.getBoolean("questionB", false);
boolean answerC = settings.getBoolean("questionC", false);
boolean answerD = settings.getBoolean("questionD", false);
I'm working on same application and the solution is that you have to store state of Radio button according to your question Number and for each question there is different key, like this:
final RadioButton rdSelection=(RadioButton)findViewById(mradioOptGroup.getCheckedRadioButtonId());
int child_index=mradioOptGroup.indexOfChild(rdSelection);
switch(mid)
{
case 1:
sharedpreferences.putint("",child_index);
break;
case 2:
sharedpreferences.putint("",child_index);
break;
}
and do like this for all your questions on every next question
and on every previous question you have to store state of radio button of mid+1
where mid is your question number
i just solved this problem , now i am able to save the current state of radio button on every next click and on every previous click i get back the radio state,even at the if the user changed the state by going to previous question or any of the question.

Regarding the Checked state of a checkbox inside a list view

I am developing a simple application,in which i am displaying a check Box and a text in each line of a list,but while i am selecting or checking one check box some other check boxes inside my list view are checked automatically.
I have done a lot Google on it and unable to find a way to fix this...
Please help me....
Thanx in advance....
public void checkevent(View v) throws ParseException
{
lv=(ListView)v.getParent().getParent();
int i=lv.getPositionForView(v);
Object o = lv.getItemAtPosition(i);
String item= o.toString();
int q=item.indexOf("-",0);
String alarm_date=new_date+" "+item.substring(0,q);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Date rdate = (Date)formatter.parse(alarm_date);
set_prog=item.substring(q+1,item.length())+" on "+item.substring(0,q);
if(((CompoundButton) v).isChecked())
{
if(rdate.getTime()>=new Date().getTime())
{
if(program_reminder_main.contains((alarm_date+"--"+item.substring(q+1,item.length()))))
{
Toast.makeText(this,"You have already selected this one", Toast.LENGTH_LONG).show();
((CompoundButton) v).setChecked(false);
}
else {
program_reminder_main+=("~"+alarm_date+"--"+item.substring(q+1,item.length()));
}
//To call the Alarm service Class at respective time
Toast.makeText(this, "Alarm Set For"+" "+item.substring(q+1,item.length())+" on "+item.substring(0,q), Toast.LENGTH_LONG).show();
Intent myIntent = new Intent(MainClass.this, MyAlarmService_Movie.class);
pendingIntent = PendingIntent.getService(MainClass.this, 0, myIntent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP,rdate.getTime()-30000,pendingIntent);
}
else {
((CompoundButton) v).setChecked(false);
Toast.makeText(MainClass.this, "Alarm can't be set Before to crrent time", Toast.LENGTH_LONG).show();
}
}
else if(!((CompoundButton) v).isChecked()){
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
alarmManager.cancel(pendingIntent);
Toast.makeText(MainClass.this, "Reset Alarm", Toast.LENGTH_LONG).show();
}
}
ignore the extra things... just concentrate on the code for check box...and for your info. i have set the above method in the check Box's properties...
The problem is that list reuses your view .
Let's say view1 is first associated with id 1 and you check it. Then, you scroll and view1 is converted to display id 10. But since the view isn't recreated, it will still have the checkbox state from the item with id 1.
So basically the solution is to store somewhere which items are selected and in our getView method, you would do
ckeckbox.setChecked(isItemChecked(position));
And you have to implement isItemChecked(int position);
An inefficient but working implementation would be to use an array of boolean in your activity, let's say
boolean[] itemChecked;
And then in getView, you set a listener on checkbox checked . You also set the checked state using the array.
checkbox .setOnCheckedChangeListener (new OnCheckedChangeListener () {
public void onCheckedChanged (CompoundButton btn, boolean isChecked) {
itemChecked[position] = isChecked;
}
});
checkbox .setChecked(itemChecked[position]);
checkbox state should be saved
Declare a boolean itemChecked and save the check box state in it
boolean[] itemChecked = new boolean[100];
public View getView(int pos, View inView, ViewGroup parent) {
final CheckBox checkBox = (CheckBox) v.findViewById(R.id.bcheck);
checkBox.setTag(pos); checkBox.setOnClickListener(new OnClickListener()
{
#Override
public void onClick(View arg0)
{
String position = (String) checkBox.getTag();
if (checkBox.isChecked() == true) {
itemChecked[Integer.valueOf(position)] = checkBox.isChecked();
} else {
itemChecked[Integer.valueOf(position)] = checkBox.isChecked();
} } });
checkBox.setChecked(itemChecked[pos]);
return (v); }
REFER : Automatic selection of checkboxes inside listview - android
in my opinion,
You should look carefull in :
method: getView(..)
and onClick()
Good Luck

Categories

Resources