android - Generate xml by edittext and spinner values -


i have many edittext , spinners , wan't create xml file after validation button, don't know how values , put them in xml variable.

i try search tutorial fnd nothing: https://www.google.fr/search?biw=1366&bih=608&noj=1&q=android+form+values+in+xml&oq=android+form+values+in+xml

        <relativelayout                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:layout_marginbottom="@dimen/marge"                 android:focusable="true"                 android:focusableintouchmode="true"                 android:paddingleft="@dimen/marge"                 android:paddingright="@dimen/marge"                 android:paddingtop="@dimen/marge">                   <textview                     android:id="@+id/votresituation"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentend="true"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_marginbottom="@dimen/marge2"                     android:gravity="center"                     android:text="1. votre situation financière"                     android:textcolor="#2b729f"                     android:textsize="@dimen/h1"                     android:textstyle="bold" />                   <textview                     android:id="@+id/projet"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_below="@+id/votresituation"                     android:text="votre projet*" />                  <spinner                     android:id="@+id/spinnerprojet"                     style="@style/spinner_style"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_below="@+id/projet"                     android:layout_marginbottom="10dp"                     android:layout_margintop="10dp"                     android:entries="@array/projet"                     android:paddingbottom="10dp"                     android:paddingtop="10dp" />                  <textview                     android:id="@+id/tvprojet"                     android:layout_width="0dp"                     android:layout_height="0dp"                     android:layout_alignright="@+id/spinnerprojet"                     android:layout_aligntop="@+id/spinnerprojet"                     android:layout_marginright="50dp"                     android:layout_margintop="30dp"                     android:focusable="true"                     android:focusableintouchmode="true"                     android:paddingright="50dp"                     android:paddingtop="0dp" />                  <textview                     android:id="@+id/creditsimmobiliers"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_below="@+id/spinnerprojet"                     android:layout_marginbottom="@dimen/marge"                     android:layout_margintop="@dimen/marge2"                     android:paddingleft="@dimen/marge"                     android:text="crédits immobiliers :"                     android:textsize="@dimen/h2"                     android:textstyle="bold|italic" />                  <textview                     android:id="@+id/tvcredits"                     android:layout_width="0dp"                     android:layout_height="0dp"                     android:layout_alignright="@+id/creditsimmobiliers"                     android:layout_aligntop="@+id/creditsimmobiliers"                     android:focusable="true"                     android:focusableintouchmode="true"                     android:paddingright="50dp"                     android:paddingtop="0dp" />                  <textview                     android:id="@+id/mensualitestotales"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_below="@+id/creditsimmobiliers"                     android:text="mensualités totales*" />                  <edittext                     android:id="@+id/editmensualitestotales"                     android:layout_width="fill_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_below="@+id/mensualitestotales"                     android:layout_marginbottom="5dp"                     android:background="#ebebeb"                     android:inputtype="number"                     android:maxlength="10"                     android:padding="5dp"                     android:singleline="true" />                  <textview                     android:id="@+id/capitauxrestants"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_below="@+id/editmensualitestotales"                     android:layout_margintop="@dimen/marge"                     android:text="capitaux restants dûs*" />                  <edittext                     android:id="@+id/editcapitauxrestants"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_below="@+id/capitauxrestants"                     android:layout_marginbottom="5dp"                     android:background="#ebebeb"                     android:inputtype="number"                     android:maxlength="10"                     android:padding="5dp"                     android:singleline="true" />                  <textview                     android:id="@+id/creditsconsommations"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_below="@+id/editcapitauxrestants"                     android:layout_marginbottom="@dimen/marge"                     android:layout_margintop="@dimen/marge2"                     android:paddingleft="@dimen/marge"                     android:text="crédits consommations :"                     android:textsize="@dimen/h2"                     android:textstyle="bold|italic" />                  <textview                     android:id="@+id/mensualitestotalescc"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_below="@+id/creditsconsommations"                     android:text="mensualités totales*" />  ...                  <textview                     android:id="@+id/telephone"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_below="@+id/editemail"                     android:layout_margintop="@dimen/marge"                     android:text="téléphone*" />                  <edittext                     android:id="@+id/edittelephone"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_below="@+id/telephone"                     android:layout_marginbottom="@dimen/marge"                     android:background="#ebebeb"                     android:inputtype="number"                     android:maxlength="14"                     android:padding="5dp"                     android:singleline="true" />                  <checkbox                     android:id="@+id/declare"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_below="@+id/edittelephone"                     android:layout_marginbottom="@dimen/marge2"                     android:layout_margintop="@dimen/marge2"                     android:text="je déclare sur l'honneur l'exactitude des informations renseignées" />                  <textview                     android:id="@+id/tvdeclare"                     android:layout_width="0dp"                     android:layout_height="0dp"                     android:layout_alignbottom="@+id/declare"                     android:layout_alignright="@+id/declare"                     android:focusable="true"                     android:focusableintouchmode="true"                     android:paddingtop="0dp" />                  <button                     android:id="@+id/valider"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:layout_alignparentend="true"                     android:layout_alignparentleft="true"                     android:layout_alignparentright="true"                     android:layout_alignparentstart="true"                     android:layout_below="@+id/declare"                     android:layout_marginbottom="@dimen/marge2"                     android:background="#ec5256"                     android:paddingbottom="@dimen/marge"                     android:paddingtop="@dimen/marge"                     android:text="valider"                     android:textcolor="#ffffff" />              </relativelayout> 

here fragment:

    valider.setonclicklistener(             new view.onclicklistener() {                 @override                 public void onclick(view v) { 

... check empty values } });


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -