IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Android Discussion :

Créer un panier d'achat


Sujet :

Android

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut Créer un panier d'achat
    bonjour,

    j'ai crée un layout deviser en deux une partie qui comporte une listview avec les différent article avec un bouton ajouter au panier et une deuxième partie avec une interface qui vva comporter les article ajouter ensemble.
    comment je peut faire ce genre d'exemple , une idée ou un tuto cela serait parfais et merci

  2. #2
    Membre régulier Avatar de Rappunzell
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Novembre 2007
    Messages
    93
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien Help Desk

    Informations forums :
    Inscription : Novembre 2007
    Messages : 93
    Points : 91
    Points
    91
    Par défaut
    Je ne veux pas te décourager, mais personne ne répondra à une question si peu précise

    Montres nous déjà ce que tu as fais et dis nous exactement ce que tu veux faire.

  3. #3
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut
    d'accord voici le probleme:

    -j'ai une listeview comportant des articles , chaque article comporte un non , une description et un bouton ajouter au panier , la listwiew est rempli par un json.

    -je veux lorsque je clique sur ajouter au panier l'article soit ajouter au panier avec son non et son prix voila j’espère que je suis clair ):.

  4. #4
    Membre régulier Avatar de Rappunzell
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Novembre 2007
    Messages
    93
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien Help Desk

    Informations forums :
    Inscription : Novembre 2007
    Messages : 93
    Points : 91
    Points
    91
    Par défaut
    Peux-tu s'il te plait nous mettre le code qui tu as déjà écrit ? (Avec les XML de tes layout)

    Je suppose que tu as créé un ListViewAdapter avec un layout xml réprésentant chaque élément (ligne) de ta ListView (appelons le article.xml).

    Là, comme ça, je dirais que tu dois dans un premier temps créer un autre layout (appelons le article_panier.xml) qui lui représentera un article et qui sera affiché dans la deuxième partie de ton layout principal (celui qui est divisé en deux, donc).

    article_panier.xml comprendra donc deux TextView qui seront le nom de ton article ainsi que son prix.

    Dans l'évènement onClick() des boutons "ajouter au panier", tu récupères le nom et le prix de article.xml, le layout de la partie panier (la deuxième partie de ton layout principal). Tu inflate une vue à partir de article_panier.xml et tu initialises les deux TextView de cette dernière avec les valeurs récupérées. Il ne te reste plus qu'a ajouté la vue fraichement créé dans le layout panier.

    Voilà en gros. Ça reste une idée, il me faudrait voir ton code pour être plus clair.

    Tu peux jeter un oeil sur ce post pour mieux comprendre, éventuellement.

  5. #5
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut
    je suis très reconnaissons parce-que tu me répond mais je ne voix pas la nécessité de mettre le code , c'est comme déjà décrit je ne que une listview et son contenu que je veu mettre dans un panier .

    j'ai beau chercher mais je trouve pas des tuto de ce genre alors si tu connais un stp donne le moi et merci 10000 fois

  6. #6
    Membre à l'essai
    Inscrit en
    Septembre 2006
    Messages
    24
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 24
    Points : 17
    Points
    17
    Par défaut
    Citation Envoyé par nemeum Voir le message
    je suis très reconnaissons parce-que tu me répond mais je ne voix pas la nécessité de mettre le code , c'est comme déjà décrit je ne que une listview et son contenu que je veu mettre dans un panier .

    j'ai beau chercher mais je trouve pas des tuto de ce genre alors si tu connais un stp donne le moi et merci 10000 fois
    tu dois mettre le code de l'affichage pour qu'on puisse te répondre

    sinon difficile de donner une idée comme ça

  7. #7
    Membre régulier Avatar de Rappunzell
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Novembre 2007
    Messages
    93
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien Help Desk

    Informations forums :
    Inscription : Novembre 2007
    Messages : 93
    Points : 91
    Points
    91
    Par défaut
    Si je te demande ton code, c'est que j'en ai besoin. :-)

    On ne peut pas toujours trouver de tutoriel qui donne une exacte marche à suivre sur tout ce qu'on veut faire.

    Là je veux pouvoir adapter mon explication à ton cas. Sinon ça ne sert pas à grand chose, l'ami :-)

  8. #8
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut
    Rappunzell, je suis désolé et merci beaucoup pour votre patience. Je vais essayer de metter le code et j'espère que tu pourras le comprendre .

    Voici le code java et xml des grid view des categorie:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    package com.evaste.menumeric;
     
    import java.util.ArrayList;
    import java.util.HashMap;
     
    import org.json.JSONArray;
    import org.json.JSONException;
    import org.json.JSONObject;
     
    import com.androidexample.gridview.adapter.CustomGridAdapter;
     
    import android.app.Activity;
    import android.app.ProgressDialog;
    import android.content.Intent;
    import android.os.AsyncTask;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.widget.GridView;
    import android.widget.ImageButton;
    import android.widget.ListView;
     
    public class Magasiner extends Activity {
    	JSONObject jsonobject;
    	JSONArray jsonarray;
    	GridView gridView;
    	CustomGridAdapter adapter;
    	ProgressDialog mProgressDialog;
    	ArrayList<HashMap<String, String>> arraylist;
    	public static String categorie_label = "categorie_label";
    	public static String categorie_id = "categorie_id";
    	public static String categorie_comment = "categorie_comment";
    	public static String categorie_image = "categorie_image";
    	ImageButton magasiner;
    	ImageButton accueil;
     
     
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.magasiner);
     
    		gridView = (GridView) findViewById(R.id.gridView1);
     
    		magasiner = (ImageButton) findViewById(R.id.magasiner);
    		magasiner.setOnClickListener(new View.OnClickListener() {
    			@Override
    			public void onClick(View v) {
    				Intent intent = new Intent(Magasiner.this, Magasiner.class);
    				startActivity(intent);
    			}
    		});
     
    		accueil = (ImageButton) findViewById(R.id.accueil);
    		accueil.setOnClickListener(new View.OnClickListener() {
    			@Override
    			public void onClick(View v) {
    				Intent intent = new Intent(Magasiner.this, MainActivity.class);
    				startActivity(intent);
    			}
    		});
    		// Execute DownloadJSON AsyncTask
    		new DownloadJSON().execute();
     
    	}
     
    	private class DownloadJSON extends AsyncTask<Void, Void, Void> {
    		@Override
    		protected void onPreExecute() {
    			super.onPreExecute();
    			// Create a progressdialog
    			mProgressDialog = new ProgressDialog(Magasiner.this);
    			// Set progressdialog title
    			mProgressDialog.setTitle("Android JSON Parse Tutorial");
    			// Set progressdialog message
    			mProgressDialog.setMessage("Loading...");
    			mProgressDialog.setIndeterminate(false);
    			// Show progressdialog
    			mProgressDialog.show();
    		}
     
    		@Override
    		protected Void doInBackground(Void... params) {
    			// Create an array
    			arraylist = new ArrayList<HashMap<String, String>>();
    			// Retrieve JSON Objects from the given URL address
    			jsonobject = JSONfunctions
    					.getJSONfromURL("http://www.evaste.com/manger/wsjsoncat/jsoncat");
     
     
    			try {
     
    				// Locate the array name in JSON
    				jsonarray = jsonobject.getJSONArray("categorie");
     
    				for (int i = 0; i < jsonarray.length(); i++) {
    					HashMap<String, String> map = new HashMap<String, String>();
    					jsonobject = jsonarray.getJSONObject(i);
    					// Retrive JSON Objects
    					map.put("categorie_label", jsonobject.getString("categorie_label"));
    					map.put("categorie_comment", jsonobject.getString("categorie_comment"));
    					map.put("categorie_image", jsonobject.getString("categorie_image"));
    					map.put("categorie_id", jsonobject.getString("categorie_id"));
    					// Set the JSON Objects into the array
    					arraylist.add(map);
    				}
    			} catch (JSONException e) {
    				Log.e("Error", e.getMessage());
    				e.printStackTrace();
    			}
    			return null;
    		}
     
    		@Override
    		protected void onPostExecute(Void args) {
    			// Locate the listview in listview_main.xml
    			gridView = (GridView) findViewById(R.id.gridView1);
    			// Pass the results into ListViewAdapter.java
    			adapter = new CustomGridAdapter(Magasiner.this, arraylist);
    			// Set the adapter to the ListView
    			gridView.setAdapter(adapter);
    			// Close the progressdialog
    			mProgressDialog.dismiss();
    		}
    	}
    }
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="com.evaste.menumeric.MainActivity"
        tools:ignore="MergeRootFrame" >
     
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#fff"
            android:orientation="vertical" >
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="124dp"
                android:layout_weight="0.03"
                android:orientation="vertical" >
     
                <ImageView
                    android:id="@+id/baniere"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingBottom="5dp"
                    android:paddingTop="0dp"
                    android:scaleType="fitXY"
                    android:background="#fff"
                    android:src="@drawable/bniere" />
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:background="#ffff"
                android:orientation="vertical" >
     
    <GridView
        android:id="@+id/gridView1"
        android:layout_width="1206dp"
        android:layout_height="300dp"
        android:columnWidth="310dp"
        android:verticalSpacing="100dp"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="50dp"
        android:gravity="center"
        android:numColumns="auto_fit"
        android:stretchMode="columnWidth" >
     
    </GridView>
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal" >
     
                <ImageButton
                    android:id="@+id/accueil"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/acc" />
     
                <ImageButton
                    android:id="@+id/magasiner"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/mag" />
     
                <ImageButton
                    android:id="@+id/imageButton1"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_gravity="left"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/cont" />
            </LinearLayout>
     
        </LinearLayout>
     
    </FrameLayout>
    Le code java et xml des entités acceder a travers les categories :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    package com.evaste.menumeric;
     
    import java.io.IOException;
    import java.util.ArrayList;
     
    import org.apache.http.HttpEntity;
    import org.apache.http.HttpResponse;
    import org.apache.http.client.HttpClient;
    import org.apache.http.client.methods.HttpGet;
    import org.apache.http.impl.client.DefaultHttpClient;
    import org.apache.http.util.EntityUtils;
    import org.json.JSONArray;
    import org.json.JSONException;
    import org.json.JSONObject;
     
    import android.app.Activity;
    import android.app.ProgressDialog;
    import android.content.Intent;
    import android.net.ParseException;
    import android.os.AsyncTask;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.widget.ImageButton;
    import android.widget.ListView;
    import android.widget.TextView;
    import android.widget.Toast;
     
    import com.androidexample.gridview.adapter.EntiteAdapter;
     
    public class Entite extends Activity {
    	public static String categorie_label;
    	public static String categorie_id;
    	ImageButton magasiner;
    	ImageButton accueil;
    	ArrayList<Entities> enttiesList;
    	String position;
    	EntiteAdapter adapter;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.entite);
     
    		enttiesList = new ArrayList<Entities>();
    		new JSONAsyncTask()
    				.execute("http://www.evaste.com/manger/wsjsonent/jsonent");
     
    		ListView listview = (ListView) findViewById(R.id.entities);
    		adapter = new EntiteAdapter(getApplicationContext(), R.layout.row,
    				enttiesList);
    		listview.setAdapter(adapter);
    		Intent i = getIntent();
    		categorie_label = i.getStringExtra("categorie_label");
     
    		TextView categorieTitle = (TextView) findViewById(R.id.titre_pt);	
    		categorieTitle.setText(categorie_label);
    		magasiner = (ImageButton) findViewById(R.id.magasiner);
    		magasiner.setOnClickListener(new View.OnClickListener() {
    			@Override
    			public void onClick(View v) {
    				Intent intent = new Intent(Entite.this, Magasiner.class);
    				startActivity(intent);
    			}
    		});
     
    		accueil = (ImageButton) findViewById(R.id.accueil);
    		accueil.setOnClickListener(new View.OnClickListener() {
    			@Override
    			public void onClick(View v) {
    				Intent intent = new Intent(Entite.this, MainActivity.class);
    				startActivity(intent);
    			}
    		});
     
    	}
     
    	class JSONAsyncTask extends AsyncTask<String, Void, Boolean> {
     
    		ProgressDialog dialog;
     
    		@Override
    		protected void onPreExecute() {
    			super.onPreExecute();
    			dialog = new ProgressDialog(Entite.this);
    			dialog.setMessage("Loading, please wait");
    			dialog.setTitle("Connecting server");
    			dialog.show();
    			dialog.setCancelable(false);
    		}
     
    		@Override
    		protected Boolean doInBackground(String... urls) {
    			try {
     
    				// ------------------>>
    				HttpGet httppost = new HttpGet(urls[0]);
    				HttpClient httpclient = new DefaultHttpClient();
    				HttpResponse response = httpclient.execute(httppost);
     
    				// StatusLine stat = response.getStatusLine();
    				int status = response.getStatusLine().getStatusCode();
     
    				if (status == 200) {
    					HttpEntity entity = response.getEntity();
    					String data = EntityUtils.toString(entity);
     
    					JSONObject jsono = new JSONObject(data);
    					JSONArray jarray = jsono.getJSONArray("entite");
    					Log.e("---eded--", String.valueOf(jarray));
     
    					for (int i = 0; i < jarray.length(); i++) {
    						Intent j = getIntent();
    						categorie_id = j.getStringExtra("categorie_id");
    						String cat=categorie_id;
    						Log.e("---cat--", cat);
     
    						JSONObject object = jarray.getJSONObject(i);
     
    						Log.e("---obj--", String.valueOf(object));
    						String dd=object.getString("id_categorie");
    						Log.e("---dd--", String.valueOf(dd));
    						if(cat.equals(dd)){
    						Entities entities = new Entities();
    						entities.setEntitie_title(object
    								.getString("entitie_title"));
    						entities.setEntitie_description(object
    								.getString("entitie_description"));
    						entities.setEntitieprice(object
    								.getString("entitie_price"));
    						entities.setEntitie_cooking_time(object
    								.getString("entitie_cooking_time"));
    						entities.setImage(object.getString("entitie_image"));
     
    						enttiesList.add(entities);
    						}else{
     
    							Log.e("---obj--", "lklklklk");
    						}
     
    					}
    					return true;
    				}
     
    				// ------------------>>
     
    			} catch (ParseException e1) {
    				e1.printStackTrace();
    			} catch (IOException e) {
    				e.printStackTrace();
    			} catch (JSONException e) {
    				e.printStackTrace();
    			}
    			return false;
    		}
     
    		protected void onPostExecute(Boolean result) {
    			dialog.cancel();
    			adapter.notifyDataSetChanged();
    			if (result == false)
    				Toast.makeText(getApplicationContext(),
    						"Unable to fetch data from server", Toast.LENGTH_LONG)
    						.show();
     
    		}
    	}
     
    }
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    <?xml version="1.0" encoding="UTF-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="com.evaste.menumeric.MainActivity"
        tools:ignore="MergeRootFrame" >
     
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#fff"
            android:orientation="vertical" >
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="124dp"
                android:orientation="vertical" >
     
                <ImageView
                    android:id="@+id/baniere"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingBottom="5dp"
                    android:paddingTop="0dp"
                    android:background="#fff"
                    android:scaleType="fitXY"
                    android:src="@drawable/bniere" />
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#fff"
                android:orientation="vertical" >
     
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginBottom="0dp"
                    android:layout_marginTop="20dp"
                    android:layout_weight="1"
                    android:background="#fff"
                    android:orientation="vertical" >
     
                    <TextView
                        android:id="@+id/titre_pt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingLeft="20dp"
                        android:text="Petit déjeuner "
                        android:textColor="#ff0000"
                        android:textSize="30sp"
                        android:textStyle="bold|italic"
                        android:typeface="serif" />
                </LinearLayout>
     
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="400dp"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:background="#ffff"
                android:orientation="horizontal" >
     
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="400dp"
                    android:layout_weight="1" >
     
                    <ListView
                        android:id="@+id/entities"
                        android:layout_width="match_parent"
                        android:layout_marginLeft="100dp"
                        android:layout_height="400dp"
                        android:layout_weight="1" 
                        tools:listitem="@layout/row" >
                    </ListView>
     
                </LinearLayout>
     
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="0.62"
                    android:background="#f7f7f7"
                    android:orientation="vertical" >
     
                    <TableLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical" >
     
                        <TableRow
                            android:id="@+id/tableRow1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content" >
     
                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:orientation="horizontal" >
     
                                <TextView
                                    android:id="@+id/descCat"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="                      "
                                    android:textSize="20sp" />
     
                                <TextView
                                    android:id="@+id/TextView08"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingLeft="25dp"
                                    android:paddingRight="25dp"
                                    android:text="PLAT"
                                    android:textColor="#ff0000"
                                    android:textSize="20sp"
                                    android:textStyle="bold"
                                    android:typeface="monospace" />
     
                                <TextView
                                    android:id="@+id/TextView07"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingLeft="25dp"
                                    android:paddingRight="25dp"
                                    android:text="PRIX"
                                    android:textColor="#ff0000"
                                    android:textSize="20sp"
                                    android:textStyle="bold"
                                    android:typeface="monospace" />
     
                                <TextView
                                    android:id="@+id/textView3"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingLeft="25dp"
                                    android:paddingRight="25dp"
                                    android:text="QTE"
                                    android:textColor="#ff0000"
                                    android:textSize="20sp"
                                    android:textStyle="bold"
                                    android:typeface="monospace" />
     
                            </LinearLayout>
     
                        </TableRow>
     
                        <TableRow
                            android:id="@+id/tableRow2"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content" >
                        </TableRow>
     
                        <TableRow
                            android:id="@+id/tableRow3"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content" >
                        </TableRow>
     
                        <TableRow
                            android:id="@+id/tableRow4"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content" >
                        </TableRow>
                    </TableLayout>
     
                </LinearLayout>
            </LinearLayout>
     
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal" >
     
                <ImageButton
                    android:id="@+id/accueil"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/acc" />
     
                <ImageButton
                    android:id="@+id/magasiner"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/mag" />
     
                <ImageButton
                    android:id="@+id/imageButton1"
                    android:layout_width="384dp"
                    android:layout_height="78dp"
                    android:layout_gravity="left"
                    android:layout_weight="1"
                    android:background="#f40101"
                    android:src="@drawable/cont" />
            </LinearLayout>
        </LinearLayout>
     
        </FrameLayout>
    Si tu as d'autre demande ou question je serai ravi de te répondre.

  9. #9
    Membre régulier Avatar de Rappunzell
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Novembre 2007
    Messages
    93
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien Help Desk

    Informations forums :
    Inscription : Novembre 2007
    Messages : 93
    Points : 91
    Points
    91
    Par défaut
    Ce qui serait bien, c'est que tu édites ton post afin d'utiliser la balise CODE (le bouton "#"), et que tu indentes celui-ci, parce que là c'est incompréhensible

  10. #10
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut
    l’équipe de forum ma aider à faire le changement de mon code merci , alors est ce que tu peux m'aider ?

  11. #11
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2014
    Messages
    13
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2014
    Messages : 13
    Points : 7
    Points
    7
    Par défaut crée un mini jeux sous android
    bonjour,

    je veux crée un mini jeu 2d dans mon projet.

    le jeux est comme suit:

    -des images qui chute de haut en bas de l'ecran et chaque fois que je touche une image le score marque +1 quand j atteint par eemple 20 le jeux ce termine .
    merci de m'aider.

Discussions similaires

  1. Créer un panier et les sessions
    Par juju921 dans le forum Langage
    Réponses: 11
    Dernier message: 18/01/2009, 19h49
  2. Comment créer son panier
    Par dandav55 dans le forum E-Commerce
    Réponses: 1
    Dernier message: 21/09/2007, 16h15
  3. [Système] Aide pour un script panier d achat
    Par Skippy1 dans le forum Langage
    Réponses: 3
    Dernier message: 06/01/2007, 18h03
  4. [Tableaux] Panier d'achat et tableau
    Par stefane321 dans le forum Langage
    Réponses: 1
    Dernier message: 27/09/2006, 17h10
  5. créer un Panier d'achat, quelle techno ?
    Par virgul dans le forum E-Commerce
    Réponses: 7
    Dernier message: 14/06/2005, 15h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo