android-imageview

rotation and scaling using multi touch in android

雨燕双飞 提交于 2019-12-18 10:52:27
问题 i want to rotate and scale the image on multi touch event, i am able to drag, scale the image but i can't understand the rotation of image. i am facing problem so please help me asap. my code is there public class Touch extends Activity implements OnTouchListener { private static final String TAG = "Touch"; // These matrices will be used to move and zoom image Matrix matrix = new Matrix(); Matrix matrix1 = new Matrix(); Matrix savedMatrix = new Matrix(); Matrix savedMatrix2 = new Matrix(); //

Android: Set ImageView layout_height programmatically

爱⌒轻易说出口 提交于 2019-12-18 10:48:24
问题 I have an ImageView in my main.xml file: <ImageView android:id="@+id/pageImage" android:layout_width="270dp" android:layout_height="45dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="25dp" android:layout_marginTop="15dp" android:scaleType="fitXY" android:src="@drawable/pageimage" /> What I only need to do is to set the the layout_height programmatically to another value. Additionally, I need to set the value in dp . So it is currently

How to choose an image resolution to be shown fullscreen?

半腔热情 提交于 2019-12-18 07:16:06
问题 I have an image which is actually 393 x 21 px, which I would like to set on the bottom of my View. The problem is that, even if i set the width and the height to fill_parent, my image stays very small in the middle of the screen bottom and on the left and the right I have an empty field. I can resolve this by reducing the Image width size mannualy but is ther any other solution whic could set the image in fullscreen ? Thank you. 回答1: //in your xml Image attribute as android:scaleType="fitXY"

Why does a blurry image appear in a simple android camera app?

半腔热情 提交于 2019-12-18 07:14:35
问题 I tried to make a simple camera app that captures an image and views the image in an imageview: I tried this code in MainActivity: ImageView myImageView; public void myButtonCamera (View view){ Intent cameraIntent = new Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, 10); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data){ super.onActivityResult(requestCode,resultCode,data); if (resultCode == RESULT_OK){ if

How to retriving base64 strings(large image) from server to android

久未见 提交于 2019-12-18 07:09:40
问题 i have to retrieve image of all size from server to android mobile with reference to id ,so that i tried with this below coding and successfully got the base 64 string and retrieved image for equivalent base64string it works fine for small size images but when i go for big size image it remains black screen not able to get large size images on screen through this method. thanks in advance. how to retrieve large size base64 string through soap object from a server package com.imageload; import

How to Update contact image using contact provider operation.

回眸只為那壹抹淺笑 提交于 2019-12-18 07:03:46
问题 The following code is used to update the image but it throws illegal or bad value exception.any body can solve this. Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap(); File f = new File(picturePath); Uri photoUri = Uri.fromFile(f); add to array list coding ops.add(ContentProviderOperation .newUpdate(ContactsContract.Data.CONTENT_URI) .withSelection( ContactsContract.Data.CONTACT_ID + " = ? AND " + ContactsContract.Data.MIMETYPE + " = ?", new String[] { contactid,

Custom Dialog Boxes to show image, text and setTitle

感情迁移 提交于 2019-12-18 05:13:31
问题 I have a little glitch in my program I've been trying to figure out what it is I'm missing. In my .java file, I have a gridview of images where I setOnItemsClickListener on items in the gridview. I have 2 xml files, one for the .java and the other is set as contentview to popup window on click on any of the gridview items. I want it that whenever user clicks on item in gridview, the custom dialog box pops up, to show the image clicked, plus a brief description on the image. So far, the dialog

Android: send an email with an image from an ImageView

穿精又带淫゛_ 提交于 2019-12-18 04:30:20
问题 I'm new here on stackoverflow. I have a little problem with my Android app, expecially with an ImageView that triggers an event on tap. This event opens an email client with some pre-written text and it should attach the image of the Image. I already know that the image should be converted into a bitmap before, then compressed and send it to the email client, but unfortunatly I'm not an Android/Java expert so I can't find how to do that. This is the code of the email method: new code below

Draw on Picture in android

て烟熏妆下的殇ゞ 提交于 2019-12-18 04:23:11
问题 I was working on a custom imageview that can draw line on it, the problem is that the drawing area size is not exactly with the bitmap size. For example, in the other app, it looks like: However, in my app, it looks like Here is my program, which seems the bitmap is not fit with the canvas. Thanks for helping public class DrawingView extends View { //drawing path private Path drawPath; //drawing and canvas paint private Paint drawPaint, canvasPaint; //initial color private int paintColor =

Large ListView containing images in Android

北城以北 提交于 2019-12-18 02:57:30
问题 For various Android applications, I need large ListView s, i.e. such views with 100-300 entries. All entries must be loaded in bulk when the application is started, as some sorting and processing is necessary and the application cannot know which items to display first, otherwise. So far, I've been loading the images for all items in bulk as well, which are then saved in an ArrayList<CustomType> together with the rest of the data for each entry. But of course, this is not a good practice, as