Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

Samsung Galaxy S III - Android


AD MOB

Špičkový smartphone od Samsungu.

Technické parametry Samsung i9300 Galaxy S III
Rozměry a hmotnost: 137 x 71 x 9 mm, 133 gramů
Datové funkce: GPS modul, WiFi, Bluetooth, NFC, GPRS, EDGE, HSCSD, Hardwarový modem, Infraport
Sítě: pásma GSM 850, 900, 1 800, 1 900 MHz pásma WCDMA (3G) 850, 900, 1 900, 2 100 MHz
Displej: HD Super AMOLED diplej o velikosti 1280x720 4,8 palců
Procesor: čtyřjádrový procesor 1.4 GHz
Uživatelská paměť: 16 MB
paměť RAM 1 024 MB
Operační systém: Android 4.0 ICS
Hudba: MP3
Video: HD rozlišení
Fotoaparát: 8 Mpix
Navigace:
Baterie: Li-Pol, pohotovostní doba 390 hodin
Cena: cca 14.500 korun / léto 2012

Samsung i9300 Galaxy S III obrázek
samsung-i9300-galaxy-s-III

397LW NO topic_id




AD

Další témata ....(Topics)


3

Download file from URL | download-file-from-url


Download image file from URL to ImageView Java Android source example code.



Context context = thisClass.this;
Drawable image = ImageOperations(context,
"//www.okhelp.cz/images/android/ad_4.png"
,"image.jpg");
ImageView imgView;
imgView = (ImageView)findViewById(R.id.idImageView);
imgView.setImageDrawable(image);

	private Drawable ImageOperations(Context ctx, String url, String saveFilename) {
		try {
			InputStream is = (InputStream) this.fetch(url);
			Drawable d = Drawable.createFromStream(is, "src");
			return d;
		} catch (MalformedURLException e) {
			e.printStackTrace();
			return null;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}

	public Object fetch(String address) throws MalformedURLException,IOException {
		URL url = new URL(address);
		Object content = url.getContent();
		return content;
	}
128

How get Drawable Android example | how-get-drawable-android-example


InputStream, getResources(),openRawResource()

 java.io.InputStream is;
is = context.getResources().openRawResource(R.drawable.my_image);

Drawable mDrawable = context.getResources().getDrawable(R.drawable.button);
mDrawable.setBounds(150, 20, 300, 100);


Drawable[] mDrawables;
int[] resIDs = new int[] {
                R.drawable.btn_ok,
                R.drawable.btn_storno,
                R.drawable.btn_help
            };
            mDrawables = new Drawable[resIDs.length];
            Drawable prev = mDrawable;
            for (int i = 0; i < resIDs.length; i++) {
                mDrawables[i] = context.getResources().getDrawable(resIDs[i]);
                mDrawables[i].setDither(true);
                addToTheRight(mDrawables[i], prev);
                prev = mDrawables[i];
            }


49

Emulator window was out of view and was recentred - Android emulator warning | emulator-window-was-out-of-view-and-was-recentred-android-emulator-warning


Emulator window was out of view and was recentred
Emulator] WARNING: Data partition already in use. Changes will not persist!
Emulator] WARNING: SD Card image already in use: C:\Documents and Settings\user_name\.android\avd\hvga21_up1_7.avd/sdcard.img
Emulator] WARNING: Cache partition already in use. Changes will not persist!

Basic step
Try restart Eclipse if using from menu File->Restart

Other solutions

Solution 1: try restart ADB server
//android.okhelp.cz/how-quickly-restart-adb-exe-adb-server-android-emulator-example/


Solution 2:

Delete Run Configuration


//android.okhelp.cz/android-emulator-wont-run-application-started-from-eclipse/





Solution 3:
Try delete:

c:\Documents and Settings\user_name\.android\avd\my_avd.avd\cache.img
c:\Documents and Settings\user_name\.android\avd\my_avd.avd\userdata-qemu.img



Try solution 4:
Eclipse menu select Window->Preferences->Android

Windows 32

FROM: C:\Program Files\Android\android-sdk
TO: C:\PROGRA~1\Android\android-sdk

Windows 64

FROM: C:\Program Files (x86)\Android\android-sdk
TO: C:\PROGRA~2\Android\android-sdk
152

Copy save Bitmap Image Pictures Android example | save-bitmap-image-android-example


Copy file to another

        File path = Environment.getExternalStoragePublicDirectory(
                Environment.DIRECTORY_PICTURES);
        File file = new File(path, "MyPicture.jpg");
           // the Pictures directory exists? 
            path.mkdirs();
            InputStream is = getResources().openRawResource(R.drawable.flower_blue);
            OutputStream os = new FileOutputStream(file);
            byte[] data = new byte[is.available()];
            is.read(data);
            os.write(data);
            is.close();
            os.close();


Copy and compress file

Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),
					R.drawable.flower_blue);

try {
	 FileOutputStream out = new FileOutputStream("new_bitmap.jpg");
		bitmapOrg.compress(Bitmap.CompressFormat.JPEG, 90, out);
} catch (Exception e) {
	e.printStackTrace();
	Log.e("saveBitmap", e.getMessage());
} 
383

EditText hint not show | edittext-hint-not-show


Try this solution - into xml file add row to EditText tag:


android:textColorHint="@color/grey"



Editace: 2012-06-03 08:51:32
Počet článků v kategorii: 397
Url:samsung-galaxy-s-iii-android

AD
11 Share
Share
Tweet