imageview

How to adjust relative layout when zooming an item?

喜你入骨 提交于 2019-12-23 23:06:44
问题 I have created a screen in which have created RelativeLayout dynamically. After that I have added some ImageView under RelativeLayout . The requirement is that when I click on any Image View then that ImageView should be zoom by 20% and other images show be adjusted automatically. So I have two problems: How to zoom a particular ImageView (other ImagesView should be zoom out if already zoomed in) How to adjust other Image View when perform zoom in and zoom out Please suggest, I have not

Why is my image disappearing in landscape mode?

 ̄綄美尐妖づ 提交于 2019-12-23 22:45:03
问题 I have an image in portrait mode, which is displayed correctly. When I change the configuration to landscape, the image is not displayed. Note that the LinearLayout , enclosing the ImageView is displayed right(I checked it by changing the background). But when I changed the background for the ImageView , the background was also not shown. <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:layout_weight="3"> <ImageView android

My interface class don't work when I call it from a fragment

丶灬走出姿态 提交于 2019-12-23 22:11:34
问题 I'm trying to implement this code in my project but is not working RecyclerView: how to catch the onClick on an ImageView?: I've implemented a interface to handle onclick imageview and onclick row in a recyclerview. The problem is that when I try to do a click on the imageview or in the row don't happen nothing. If I try the same in my ViewHolder class, works, because I can see the Toast. The problem is that I need that this work from my fragment. I think that maybe the problem is when I pass

Resize Imageview based on the parent height

↘锁芯ラ 提交于 2019-12-23 20:46:15
问题 I have a layout as defined below <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:orientation="vertical" > <ImageView android:id="@+id/movieImageView" android:layout_width="75dp" android:layout_height="75dp" android:layout_centerVertical="true" android:paddingBottom="5dp" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:src="

Asynchronously Load Image from URL into ImageView in Xamarin Android

为君一笑 提交于 2019-12-23 16:34:07
问题 I have a ListView of multiple items and each item in the list should have an image associated with it. I have created an Array Adapter to hold each list item and have the url of the image I wish to load. I am trying to asynchronously load the image using a web request and have it set the image and update it in the view once it has been loaded but the view should render immediatly with a default image. Here is the method I am using to try to load the image private async Task<Bitmap>

ImageView in a Custom Dialog - fill_parent does not work and my dialog is small

♀尐吖头ヾ 提交于 2019-12-23 16:01:34
问题 I have a simple request: I have to put some pictures (some small resolution, some big resolution) in a dialog and display them fullscreen. I tried this: Dialog dialog = new Dialog(getActivity()); dialog.setContentView(R.layout.custom_dialog); int picId = Integer.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("_id"))); dialog.setTitle(webcamCursor.getString(webcamCursor .getColumnIndex("City"))); image = (ImageView) dialog.findViewById(R.id.image); image.setImageResource(R

How do I periodically change background image?

纵饮孤独 提交于 2019-12-23 12:04:35
问题 I want to change the background image of my app on a one second timer (changing the background between two images) . I know how to change the image on a button press, but I'm having difficulties finding a code for the timer. What should I be doing? Thanks. 回答1: You could use View.postDelayed(Runanble r, long delayMillis) . For example, something like: public void onCreate() { ... ImageView backgroundImageView = findViewById(R.id.background); backgroundImageView.postDelayed(new Runnable() {

Issues with garbage collection and Picasso

丶灬走出姿态 提交于 2019-12-23 10:06:29
问题 I am trying to set an ImageView in a Google Maps Marker's InfoWindow and have copied the code from this answer pretty exactly, except that my InfoWindowAdapter isn't an anonymous inner class (it's just an inner class of the activity). This was working before, but for some reason it has stopped working - the onSuccess method in the Callback doesn't get called, so the InfoWindow only displays the image the second time it is opened. Looking at the logs for Picasso I'm getting messages similar to

Android ImageView centerCrop not working. Skewing instead of scaling

百般思念 提交于 2019-12-23 08:39:47
问题 I'm currently working on a Navigation Drawer where I want the user photo to be scaled, cropped, tinted, then used as the header image behind a circular crop of there picture. I can't even post images because this account is too low rep...damn me and using my old student account for most of my questions... Despite my ImageView being defined like this <ImageView android:tint="@color/clyp_copy" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable

ImageView: fill horizontal maintaining aspect ratio

╄→尐↘猪︶ㄣ 提交于 2019-12-23 07:57:18
问题 I need an ImageView scale it image until fill the parent horizontally. If the imageview background is red, and the rest of the content (below the image) is the green I'm looking for the result shown by the Picture 1 . That result is obtained automatically if the image width is higher than the screen width. But if is a small picture like in the picture 2. the best result I can get is the picture 3 (setting the ImageView width and height to fill_parent and the scaleType to FitStart The picture