imageview

Displaying bitmap image in imageview by simple adapter

寵の児 提交于 2019-12-18 17:48:45
问题 I am getting image from an url. I am using imageview in listview. I want to add the list of bitmap images into the each row of the list item. I used SimpleAdapter but the imageview shows blank.My code is below !! ArrayList<HashMap<String, Bitmap>> mylist = new ArrayList<HashMap<String, Bitmap>>(); Bundle bundle = this.getIntent().getExtras(); get = bundle.getString("name"); try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.propertyhookup.com

Pinch Zoom in android for an imageview?

半世苍凉 提交于 2019-12-18 17:12:42
问题 I have one requirement in which i have to zoom in and zoom out images on pinch.. Please if anyone can suggest me pinch zoom functionality for Imageview.???? 回答1: try this import android.content.Context; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.ScaleGestureDetector; import android.view.View; public class MyImageView extends View { private

Android: not displayed ImageView with UIL and TouchImageView

*爱你&永不变心* 提交于 2019-12-18 15:55:21
问题 I'm trying to implement load images from a URL with Universal Image Loader and zoom with TouchImageView Mike Ortiz . But when trying to view the image, black screen is displayed. I have checked that the URLs are correct. I if I see a TextView there... What am I doing wrong? ImagePagerActivity.java public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_fullscreen_view); Bundle

Align ImageView with EditText horizontally

♀尐吖头ヾ 提交于 2019-12-18 13:35:57
问题 I'm trying hard to find a way of aligning an EditText and an ImageView properly on Android. I keep getting this result: The XML part is quite simple: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center" android:scaleType="centerInside" android:src="@drawable/android" android:visibility="gone" />

how to drag and drop a image onto a image

限于喜欢 提交于 2019-12-18 12:42:05
问题 hello and merry Christmas to everyone for tomorrow(UK), I'm rather new to android but have successfully managed a few bits and pieces what im trying to achieve right now is a simple drag and drop activity that allows the user to drag and drop a shape ImageView onto another ImageView, if the image matches then it should replace the image it overlapped, and if it doesnt it should snap back to where it was, i know this means creating an if/else block in my drop event but after thumbing few many

Using an xml Layout for a Google Map Marker for Android

被刻印的时光 ゝ 提交于 2019-12-18 12:38:25
问题 I want to use a layout and not a drawable for my marker I am using with Google Maps Api 2 for an Android app. Like this: Marker m = googleMap .addMarker(new MarkerOptions() .position(LOC) .snippet(user) .title(name) .icon(BitmapDescriptorFactory.fromResource(R.layout.map_marker))); However, it seems this is only designed for use from drawable folder. I simply what an image with a background where I can change colors based on marker type. This is the layout I want to use: <LinearLayout xmlns

How do I modify TouchImageView with double tap to zoom in and out?

让人想犯罪 __ 提交于 2019-12-18 12:01:17
问题 I am modifying the TouchImageView (https://github.com/MikeOrtiz/TouchImageView/issues) to have zoom in and out for when you double tap. I have started as per this post - How does TouchImageView works? and have added the gesture detection. Now I have to implement the zooming in and zooming out which I am not sure how to do. Here is the code I have so far with the zoomIn and zoomOut methods unimplemented. Anyone know how to do this? In addition I noticed that the pinch zoom doesn't really zoom

How do I modify TouchImageView with double tap to zoom in and out?

99封情书 提交于 2019-12-18 12:01:03
问题 I am modifying the TouchImageView (https://github.com/MikeOrtiz/TouchImageView/issues) to have zoom in and out for when you double tap. I have started as per this post - How does TouchImageView works? and have added the gesture detection. Now I have to implement the zooming in and zooming out which I am not sure how to do. Here is the code I have so far with the zoomIn and zoomOut methods unimplemented. Anyone know how to do this? In addition I noticed that the pinch zoom doesn't really zoom

How to set VectorDrawable as an image for ImageView programmatically

送分小仙女□ 提交于 2019-12-18 10:48:34
问题 I want to set some vectorDrawables to a ImageView in Android Studio. I can set png and jpg drawable easily but when i want to set VectorDrawable, it does not work on imageview. img.setImageResource(R.drawable.ic_home); ic_home is VectorDrawable and this code doesn't work. 回答1: If you want to use vector drawables (less OR greater than API 21) just do the following: Set the image programmatically (e.g. in your activity): imageView.setImageResource(R.drawable.ic_left_arrow_blue); or by XML: app

How to Save images to ImageView using Shared Preferences

眉间皱痕 提交于 2019-12-18 09:43:06
问题 I have an activity that opens another activity to get a download pic. The picture comes back to my original activity and rest in an imageView. That's working fine. How do I save the image so when the user comes back later, or kills to app the image is still there. I know I am supposed the use Shared Preferences to get the image path and not save the image itself but I just don't know how do that. Main Activity public class MainActivity extends Activity { private static final int REQUEST_CODE