package adullact.publicrowdfunding.controller.project.details;
-import adullact.publicrowdfunding.R;
-import adullact.publicrowdfunding.model.exception.NoAccountExistsInLocal;
-import adullact.publicrowdfunding.model.local.callback.HoldToDo;
-import adullact.publicrowdfunding.model.local.ressource.Commentary;
-import adullact.publicrowdfunding.model.local.ressource.Project;
-import adullact.publicrowdfunding.model.server.event.CreateEvent;
import android.content.Context;
-import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
-import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.RatingBar;
import android.widget.Toast;
+import adullact.publicrowdfunding.R;
+import adullact.publicrowdfunding.model.exception.NoAccountExistsInLocal;
+import adullact.publicrowdfunding.model.local.callback.HoldToDo;
+import adullact.publicrowdfunding.model.local.ressource.Commentary;
+import adullact.publicrowdfunding.model.local.ressource.Project;
+import adullact.publicrowdfunding.model.server.event.CreateEvent;
+
/**
* @author Ferrand and Nelaupe
*/
private EditText comment_title;
private EditText comment_message;
- private CheckBox conditions;
private Button valider;
private Animation shake;
mark = (RatingBar) view.findViewById(R.id.mark);
- conditions = (CheckBox) view.findViewById(R.id.conditions);
valider = (Button) view.findViewById(R.id.valider);
shake = AnimationUtils.loadAnimation(this.getActivity()
@Override
public void onClick(View v) {
- if (!conditions.isChecked()) {
- conditions.setTextColor(Color.parseColor("#ff0000"));
- return;
- }
if (comment_title.getText().length() < 1) {
comment_title.startAnimation(shake);
}
- });
+ @Override
+ public void errorAdministratorRequired() {
+ Toast.makeText(context,
+ R.string.error,
+ Toast.LENGTH_SHORT).show();
+ back();
+ }
+ });
} catch (NoAccountExistsInLocal e) {
Toast.makeText(context, R.string.error,
Toast.LENGTH_SHORT).show();