Android app mit Fragment und Bilder

  • 4 Antworten
  • Neuester Beitrag
Diskutiere Android app mit Fragment und Bilder im Android App Entwicklung im Bereich Betriebssysteme & Apps.
C

Capkin55

Neues Mitglied
Ich hab mir ein Android ab mit drei Fragments zusammen gebastelt und will zu jedem einen Bild runterladen.
ZB.
zu Fragment1 bild1
zu Fragment2 bild2
usw...

Fragment1
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
 [LEFT]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Fragment1 [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SherlockFragment {[/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] View onCreateView(LayoutInflater inflater, ViewGroup container,[/LEFT]
 [LEFT]Bundle savedInstanceState) {[/LEFT]
 [LEFT]View rootView = inflater.inflate(R.layout.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]fragment1[/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], container, [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]false[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] rootView;[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT]}[/LEFT]
 [/SIZE]
es würd mich sehr freuen wenn ihr mir weiter helfen könntet.

danke
 
C

Capkin55

Neues Mitglied
Hallo, also ich hab mein code um geändert und hab dieses hier jetzt aber das bild wird trotzdem nicht geladen.​
Ich hab das AQuery libery runtergeladen aber hab in Main Activitiy nichts geändert.​

Code:
  [LEFT]public class Fragment1 extends SherlockFragment {[/LEFT]
   [LEFT]AQuery aq;[/LEFT]
   [LEFT]@Override[/LEFT]
 [LEFT]public View onCreateView(LayoutInflater inflater, ViewGroup container,[/LEFT]
 [LEFT]Bundle savedInstanceState) {[/LEFT]
 [LEFT]View V = inflater.inflate(R.layout.fragment1, container, false);[/LEFT]
 [LEFT]return V;[/LEFT]
 [LEFT]}[/LEFT]
   [LEFT]public void image_progress(){[/LEFT]
 [LEFT]String imageUrl="http://farm6.static.flickr.com/5035/5802797131_a729dac808_b.jpg";[/LEFT]
 [LEFT]aq.id(R.id.image).progress(R.id.progress).image(imageUrl,false,false);[/LEFT]
 [LEFT]}[/LEFT]
}
 
C

Capkin55

Neues Mitglied
Also da ich mich nicht so sehr gut auskenne weis nicht genau ich es machen soll. Wie würdest du es vorschlagen wie ich es machen soll.
 
Ähnliche Themen - Android app mit Fragment und Bilder Antworten Datum
2
10
2