Autore Topic: Passare una immagine intent[Risolto]  (Letto 289 volte)

Offline Jekan

  • Nuovo arrivato
  • *
  • Post: 44
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Umi Super
  • Sistema operativo:
    Windows 7
Passare una immagine intent[Risolto]
« il: 30 Luglio 2016, 15:25:59 CEST »
salve vorrei passare un immagine tra due activity una con una listview
Codice (Java): [Seleziona]
String CarpetofFlying1 = adapter.getItem(position);
                if (CarpetofFlying1.equals("Carpet of Flying")) {
                    Intent CarpetofFlying=new Intent(getApplicationContext(),dettagli.class);
                    CarpetofFlying.putExtra("nomedettagli","Carpet of Flying");
                    CarpetofFlying.putExtra("price","See text");
                    CarpetofFlying.putExtra("level","10 th");
                    CarpetofFlying.putExtra("aura","Moderate transmutation");
                    CarpetofFlying.putExtra("activation","See text");
                    CarpetofFlying.putExtra("weightdettagli","See text");
                    CarpetofFlying.putExtra("sourcedettagli","Dungeon Master Guide");
                    CarpetofFlying.putExtra("dettaglitutto","This rug is able to fly through the air as if affected by an overland flight spell of unlimited duration.\n" +
                            " The size, carrying capacity, and speed of the different carpets of flying are shown on the table below.\n" +
                            " Beautifully and intricately made, each carpet has its own command word to activate it—if the device is within voice range, the command word activates it, whether the speaker is on the rug or not.\n" +
                            " The carpet is then controlled by spoken directions.\n" +
                            "\n" +
                            " Size Capacity Speed Weight Market Price\n" +
                            " 5 ft. by 5 ft. 200 lb. 40 ft. 8 lb. 20,000 gp\n" +
                            " 5 ft. by 10 ft. 400 lb. 40 ft. 15 lb. 35,000 gp\n" +
                            " 10 ft. by 10 ft. 800 lb. 40 ft. 10 lb. 60,000 gp\n" +
                            "\n" +
                            " A carpet of flying can carry up to double its capacity, but doing so reduces its speed to 30 feet.\n" +
                            " It has average maneuverability, but a carpet of flying can still hover.\n" +
                            "\n" +
                            " Prerequisites: Craft Wondrous Item, overland flight, permanency.\n");

questa e la activity da dettaglio
Codice (Java): [Seleziona]
package jekan.myapplication;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class dettagli extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

        Bundle extras=getIntent().getExtras();

        TextView nomedettagli=(TextView)findViewById(;

        TextView price=(TextView)findViewById(;

        TextView bodyslot=(TextView)findViewById(;

        TextView level=(TextView)findViewById(;

        TextView aura=(TextView)findViewById(;

        TextView activation=(TextView)findViewById(;

        TextView weightdettagli=(TextView)findViewById(;

        TextView sourcedettagli=(TextView)findViewById(;

        TextView dettaglitutto=(TextView)findViewById(;

        ImageView image = (ImageView) findViewById(;
        int image_link = getIntent().getIntExtra("image_url", R.drawable.carpet_flight);


l'immagine e salvata nel drawable.
Spero che mi posiate essere d'aiuto come sempre :-) :-)

 :-P :D :D grazie ma ho risolto posto la soluzione se serve a qualcuno

« Ultima modifica: 30 Luglio 2016, 16:09:00 CEST da Jekan »