예제 #1
0
파일: AddVue.java 프로젝트: onepix/BelleVue
  public void saveVueClick(MenuItem item) {
    // 1 Panorama 2 Point d'Eau 3 Jardin 4 Places
    int categorie = 0;
    boolean sucess = false;

    name_input = (EditText) findViewById(R.id.vue_name);
    description_input = (EditText) findViewById(R.id.vue_description);

    // CHECK PICTURE
    if (nbPicture != 0) sucess = true;
    else Toast.makeText(getBaseContext(), "Take at least a picture", Toast.LENGTH_SHORT).show();

    // CHECK RADIO BUTTON
    if (sucess && Tool.check_content_radio_button(m_one, m_two, m_three, m_four)) {
      categorie = Tool.get_categorie(m_one, m_two, m_three, m_four);
      sucess = true;
    }

    boolean isSave;
    View focusView = null;

    String name = name_input.getText().toString();
    String description = description_input.getText().toString();

    Toast.makeText(getBaseContext(), name + "\n" + description, Toast.LENGTH_SHORT).show();

    // CHECK EDITEXT CONTENT
    if (sucess)
      sucess = Tool.check_content_edittext(name, description, name_input, description_input);

    /* SEND VUE TO PARSE */
    if (sucess) {
      Toast.makeText(
              getBaseContext(),
              "Categorie : "
                  + String.valueOf(categorie)
                  + "\n"
                  + "Success : "
                  + String.valueOf(sucess),
              Toast.LENGTH_SHORT)
          .show();
      saveVue(name, description, categorie, files);
    }
  }
예제 #2
0
파일: AddVue.java 프로젝트: onepix/BelleVue
 @Override
 public void onBackPressed() {
   Tool.reset_bellevue_dir(root);
   super.onBackPressed();
 }