imageview

cropping image and save to specific folder in sdcard (Android)?

送分小仙女□ 提交于 2019-12-12 01:32:40
问题 I've image has been crop. I want that image save to folder (sdcard)...I've already done crop image and show to imageview, but my problem is, I don't know how saving image crop to sdcard ? here is my code has success to crop an image.. Bundle extras = data.getExtras(); if (extras != null) { Bitmap photo = extras.getParcelable("data"); mImageView.setImageBitmap(photo); } where I can add the code to save an image that have been cropped? 回答1: Try out this way: Bundle m_extras = data.getExtras();

750 frame transparent PNG animation in ImageView at 23fps

自古美人都是妖i 提交于 2019-12-12 01:32:38
问题 I have an Activity with two ImageViews set to full screen 320 x 480. I need to play an animation but couldn't get more than 50 to play using AnimateDrawable and an xml array before running out of VM. I'm trying to switch PNGs with a Loop so I can do other stuff at points along the way. For example vibrate at frames 120, 180 & 250 etc. and play another animation at frame 400. This code below works but the ImageView takes between 180 - 280ms to update on the emulator. So I need to set thread

ImageView not resizing image

孤者浪人 提交于 2019-12-12 01:29:27
问题 I want to use an ImageView to resize an image, however the image is not being resized: ImageView imageView = new ImageView(image); imageView.setPreserveRatio(true); imageView.setFitHeight(40); System.out.println("imageview image width = " + imageView.getImage().getWidth()); System.out.println("imageview image height = " + imageView.getImage().getHeight()); The output is imageview image width = 674.0 imageview image height = 888.0 However, the width should be 40. My ImageView is not attached

Scale scrollview contents to fill screen

时光总嘲笑我的痴心妄想 提交于 2019-12-12 00:49:52
问题 I've a scrollview that displays a few bitmap imageviews to fill the screen. To support larger screens, I just want to scale the images. If I place a single imageview in the scrollview, it scales to fit (fill_parent). However, adding a second imageview underneath causes the imageviews to revert to actual size and not be upscaled to fill the screen. <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/menu_ground" android

How to Displaying an image with path stored in Database?

萝らか妹 提交于 2019-12-11 23:46:04
问题 I have stored images path in database and images in project folder. Now i am trying to view all IMAGES with their PRODUCTS in my HTML template. I have written the following code and its given me an empty images box in the output and when i open that image box in the new tab, it opens the following URL. http://localhost/cms/1 Kindly tell me the way of referring images in 'img src ' tag. include 'connect.php'; $image_query = "select * from product_images"; $image_query_run = mysql_query($image

I can't get to load an image stored in a SQLite database in imageview

ぃ、小莉子 提交于 2019-12-11 22:37:55
问题 I already have an image stored in the database in BLOB but I can't load it in an layout, please help me with the problem. The application gets closed during its running (unfortunately Image has stopped). MainActivity.java package com.example.image; import android.app.Activity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.view.Menu; import android

Prevent ImageView from receiving touch events when scrolling

ぐ巨炮叔叔 提交于 2019-12-11 22:12:15
问题 I'm making an app with lots of ImageView s and I needed to attach a touch listener in some of them. While doing this, I encountered a problem. If the pointer was held down at the location where the ImageView with touch listeners attached to it and was about to produce a scrolling event, there seems a fighting scene between the View s and the ScrollView in w/c where the event was actually occured and in w/c the event is supposed to belong. The screen scrolls in a fast rate then return where

Fit Image in imageview correctly in android

删除回忆录丶 提交于 2019-12-11 21:01:07
问题 I have a list view with logos of supermarkets as images. Currently, they are not centered perfectly and are distorted. Please look at the Here is my layout of row item <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/highlight_selector"> <ImageView style="@style/imgPriceStoreLogoSmall" android:id=

Android capture and display image app

≡放荡痞女 提交于 2019-12-11 19:45:46
问题 I am kind of new to android app development and trying to make a simple application which, Uses the system camera application to take picture by passing camera intent. Stores the image in the public folder in file system. Then takes the image from its absolute path convert it into bitmap and display it in image view by performing some scale down on it. Here is my code.... static final int REQUEST_IMAGE_CAPTURE = 1; String mCurrentPhotoPath; Button captureImageButton; static ImageView

Android imageview programmatically change color

被刻印的时光 ゝ 提交于 2019-12-11 18:59:57
问题 If I have a grayscale image displayed in an imageview, can I programmatically change its color? If it matters, the image has background transparency which would need to remain transparent. So I only want to change the color of the actual image part. 回答1: I write a simple custom ImageView before below is code for reference only: public class ColorImageView extends ImageView { private Context context; private boolean showColor; private Paint mPaint; private ColorMatrix cm; private Bitmap