Hirdetés
- Multimédiás / PC-s hangfalszettek (2.0, 2.1, 5.1)
- Philips LCD és LED TV-k
- Milyen videókártyát?
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Milyen monitort vegyek?
- Androidos tablet topic
- Méretes és széles gaming monitorral bővült az MSI kínálata
- Amlogic S905, S912 processzoros készülékek
- LG LCD és LED TV-k
- HiFi műszaki szemmel - sztereó hangrendszerek
Új hozzászólás Aktív témák
-
Sziasztok! Valamit nagyon rosszul csinálhatok mert sem a Picassoval sem az Universal Image Loaderrel nem jutok dűlőre.
Eclipset használok, bemásoltam az Universal Image Loader jar-t a libs folderbe, majd hozzáadtam a build path-hoz. Importok rendben, manifest elvileg rendben, legegyszerűbb műveletre (képbetöltés sima imageviewba) is lefagy.
MainActivity class
package com.picturetest;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;public class MainActivity extends Activity {
ImageView img;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);img = (ImageView) findViewById(R.id.imageView1);
// Create default options which will be used for every
// displayImage(...) call if no options will be passed to this method
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisk(true).build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
.defaultDisplayImageOptions(defaultOptions).build();
ImageLoader.getInstance().init(config); // Do it on Application startString imageUri = "file://mnt/sdcard/default.png";
ImageLoader imageLoader = ImageLoader.getInstance();
imageLoader.displayImage(imageUri, img);
}
}activity_main.xml
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
tools:context="com.picturetest.MainActivity"><ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/ic_launcher" /></RelativeLayout>
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.picturetest"
android:versionCode="1"
android:versionName="1.0" ><uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Include following permission if you load images from Internet -->
<uses-permission android:name="android.permission.INTERNET" /><application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.picturetest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>Az eclipse projektem feltöltöttem ide.
A fordítás hiba nélkül lefut, de ha elindítom az appot azonnal fagy. A default.png is a helyén van. Nexus 5
Mit csinálok rosszul?
Új hozzászólás Aktív témák
- Milyen okostelefont vegyek? OFF topik
- Apple Watch
- urandom0: Mégsem számőzöm az AI-t az életemből :(
- Nintendo Switch 2
- Autós topik
- Kerékpárosok, bringások ide!
- Multimédiás / PC-s hangfalszettek (2.0, 2.1, 5.1)
- PlayStation 5
- Témázgatunk, témázgatunk!? ... avagy mutasd az Android homescreened!
- Philips LCD és LED TV-k
- További aktív témák...
- 15.gen! Intel Core Ultra 9 285K +16-32GB DDR5 RAM +hűtött VRM-es Z890 lap! GAR/SZÁMLA (a Te nevedre)
- ÁRBAJNOK, MINDENRE ELÉG, A TÖKÉLETES AJÁNDÉK! VADI ÚJ GARANCIÁS MSI CYBORG RTX 4060 i7 13620h
- HP EliteBook 850 G8 Fémházas Tartós Laptop 15,6" -65% i7-1185G7 32/512 Iris Xe FHD
- Gamer PC - INTEL I7-14700KF / RTX4080 SUPER 16GB / 32GB DDR5 / 3TB SSD / 1000W 80+GOLD / 360 AIO
- Dell Optiplex 3050 Sff i5-7G /8 gb ddr4/NVME foglalt/ 250gb ssd
- Apple iPhone 14 Pro 256GB,Újszerű,Dobozával,12 hónap garanciával
- Dell Precision 3571 4G LTE i7-12700H 32GB 1000GB FHD RTX A1000 4GB 1 év teljeskörű garancia
- GYÖNYÖRŰ iPhone 13 Pro 128GB Graphite -1 ÉV GARANCIA - Kártyafüggetlen, MS3962, 100% Akkumulátor
- Samsung Galaxy S25 Edge Titanium Jetblack 12/256 GB Használt, karcmentes 6 hónap garancia
- Varmilo /Limitált kiadás/Beijing Opera/EN/Silent Red/
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest



