Commit b7b98f5f authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Handle idFoundation

parent 0396100c
......@@ -62,15 +62,24 @@ public class FoundationListActivity extends BaseActivity {
throw new Exception("Unexpected JSON");
foundationButton.setText(foundation.get("name").textValue());
final String idFoundation = foundation.get("fun_id").textValue();
foundationButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//Log.d(LOG_TAG, idFoundation);
}
});
foundationButton.setOnClickListener(new onClickFoundation(foundation.get("fun_id").asInt()));
linearLayout.addView(foundationButton);
}
}
public class onClickFoundation implements View.OnClickListener {
final int idFoundation;
public onClickFoundation(int idFoundation) {
this.idFoundation = idFoundation;
}
@Override
public void onClick(View view) {
nemopaySession.setFoundation(this.idFoundation);
Log.d(LOG_TAG, String.valueOf(this.idFoundation));
}
};
}
......@@ -25,6 +25,7 @@ public class NemopaySession {
private String key;
private String session;
private String username;
private int idFoundation;
private HTTPRequest request;
private String[] rightsNeeded;
......@@ -63,6 +64,10 @@ public class NemopaySession {
disconnect();
}
public void setFoundation(final int idFoundation) {
this.idFoundation = idFoundation;
}
public String getName() { return this.name; }
public String getKey() { return this.key; }
public String getUsername() { return username; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment