EF's Blog

Posts Tagged ‘imageview

Bitmap bmp = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory()
+ strStoragePath+strLocalFileName+strJPGext);
ivThumbnailPlaceHolder.setImageBitmap(bmp);

That is the code.

This “Environment.getExternalStorageDirectory()+ strStoragePath+strLocalFileName+strJPGext” actually meant the file path, for example : “mnt/sdcard/yourfolder/blabla.jpg”.

 

Advertisements

ImageView imgKantorPemasaran = (ImageView)findViewById(R.id.imgKantorPemasaran);
imgKantorPemasaran.setOnClickListener(new OnClickListener(){
public void onClick(View view) {

//the action supposed to be placed here

final Intent urlAddress = new Intent(Intent.ACTION_VIEW);
urlAddress.setData(Uri.parse(“http://www.thevanessasbridal.com”));
startActivity(urlAddress);
}});

 

dont forget to add this to android manifest

<uses-permission android:name=”android.permission.INTERNET”></uses-permission>
<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE”></uses-permission>


EF’s Blog

I'm just ordinary people who lived in an extra-ordinary world.

EF's Blog Stats

  • 140,184 hits
December 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
25262728293031

Archives