imageview

Save two images as a single image in android

梦想的初衷 提交于 2019-12-13 09:49:18
问题 I have an image view in android and on that image view i have another image view.. Both image views contain two different images.. Now i want to save it as a single JPG image in my phone gallery.. So how can i do that?? I tried some code but it is not working. Here is my code. XML File: <ImageView android:id="@+id/innerImage" android:layout_width="300dp" android:layout_height="230dp" android:layout_centerInParent="true" android:layout_centerVertical="true" android:contentDescription="@android

New activity not opening

这一生的挚爱 提交于 2019-12-13 08:25:43
问题 I'm an italian student developing an Android application with the latest version of Android Studio and with Android API 26 (Android Oreo). The application is very simple: 1. Main activity, "MySchoolSyllabus": it shows a list of school subjects, represented by images placed in the "res" project's folder. 2. Second activity, "Materia" (it means "subject"): once the user clicks on a subject image, this activity needs to be opened, showing another list of images, representing that subject's

How can i rotate image and video if it was captured in landscape mode?

随声附和 提交于 2019-12-13 07:14:34
问题 I have an ImageView and VideoView on my screen. My Activity is always in a portrait mode (and i can't rotate it because of another elements). How can i rotate image/video if it was captured in landscape mode? Show like on this image instead of 回答1: public Bitmap rotateBitmap(Bitmap source, float angle) { Matrix matrix = new Matrix(); // Perform matrix rotations/mirrors depending on camera that took the photo if (cameraCurrentID == Camera.CameraInfo.CAMERA_FACING_FRONT) { float[] mirrorY = {

Glide - Cannot stop gif onClick- Getting TransitionDrawable instead of Animate/GifDrawable

帅比萌擦擦* 提交于 2019-12-13 07:12:59
问题 I am loading gif image in Imageview with container recyclerview. Currently the recyclerview has only 1 gif and other are bitmaps. I am loading gif as Glide.with(context). load("https://media.giphy.com/media/TcKmUDTdICRwY/giphy.gif"). asGif(). override(params.width, params.height). diskCacheStrategy(DiskCacheStrategy.RESULT). placeholder(R.drawable.placeholder). error(R.drawable.error). listener(new RequestListener<Uri, GifDrawable>() { @Override public boolean onException(Exception e, Uri

How to align ImageView in Listview (Android)

≯℡__Kan透↙ 提交于 2019-12-13 06:59:59
问题 quick one I think: I am failing to get my listView to align the embedded ImageView properly. As you can see below, the images don't line up correctly (they are being affected by the amount of text in the neighbouring TextView): Here is the offending xml file for the row item: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeight" android

How to get the drawable name from my image in a list view Android

半腔热情 提交于 2019-12-13 06:26:01
问题 Ok so I have a list view with a custom list view adapter, and each list item has an "icon". when I click the list item, I am easily able to get all the text field names such as name address etc. I have their icon in an image view (obviously every icon is in the same id because it is getting reused in the listview). my question is how can i get the r.drawable.resource (ie pic1) when i click the list item . and pass it to my next intent (I know how to use bundle extras). I have been searching

Saving Camera Bitmap to Storage, and Setting Image with Bitmap

♀尐吖头ヾ 提交于 2019-12-13 05:41:04
问题 I know the basics on how to take a picture and set it to ImageView. photo = (Bitmap) data.getExtras().get("data"); imageView.setImageBitmap(photo); I want to do a little more than that. I am saving it to a folder on to an SD card. That I have done successfully with this: // intent Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); startActivityForResult(intent, CAMERA_REQUEST); Here is my next question: Not sure how to do

Compression of image not working

怎甘沉沦 提交于 2019-12-13 05:32:42
问题 I am trying to upload picture using camera. I am uploading it to server Clicking image and showing it in imageview ( DONE) Compressing the image size to upload (Not Working) Uploading image to S3 (with uncompressed image) (DONE) This is my onActivityResult() case CAMERA_REQUEST: { Uri selectedImage = data.getData(); String[] filePathColumn = { MediaStore.Images.Media.DATA }; Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null); cursor.moveToFirst(); int

How can I populate an ImageSwitcher from a url list? (EDIT: Horizontal RecyclerView)

早过忘川 提交于 2019-12-13 05:31:43
问题 I have an object which includes a list of strings. These are urls to pictures and I'm using Picasso library to set in ImageView. I would like to set these images in an ImageSwitcher, and I dont know how to do it (I've done some researches before but no results). Thanks for helping guys ! EDIT : I finally chose a Horizontal RecyclerView to have a Gallery like, so in my layout for a row there's only an ImageView. I also have now a Recycler Adapter but i dont know if i have to include my list of

Error inflating imageview in scrollview android

女生的网名这么多〃 提交于 2019-12-13 05:24:51
问题 I tried to have a scrolling image in my android app but have this error in my debugger: Binary xml error in line 10 :inflating android widget imageview This the xml code <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bgabout"> <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView