imageview

Android Studio XML - How to get imageview in front of button?

扶醉桌前 提交于 2019-12-13 18:48:57
问题 The question is quite simple. How do I get this imageview below to be visible in front of the button below? I am looking for an XML answer, not a Java answer. Seeing java (I think) will not change anything in the preview screen while working on the xml file. <ImageView android:layout_width="35dp" android:layout_height="35dp" android:background="@drawable/iconfb" android:layout_marginTop="90dp" android:layout_marginLeft="12.5pt" android:id="@+id/iconfb" /> <Button android:layout_width="300dp"

how to make transparent area as untouchable for ImageView in Android?

谁说胖子不能爱 提交于 2019-12-13 18:34:08
问题 I googled a lot but could not find anything useful. I have a complex png image and I want to make it touchable but for its opaque area only. I set a touch listener for it but it dispatched even I clicked on a transparent area, thats what I DON'T want. 回答1: As @Cata says, a touch event will be associated with the whole of the image. However, the touch event will tell you where in the image the touch was, and so can code something like this (ignoring checking for correct action etc): @Override

How to place buttons on a zoom&pan imageView

混江龙づ霸主 提交于 2019-12-13 17:43:11
问题 I would like a ImageView with buttons on it. The ImageView should have zoom/pan functionalities, while the buttons are zoomed as well, so they are always on the same position on the image. ATM I use the touchImageView (How can I get zoom functionality for images?) Anyone has a (easy) solution to postion the Button ? Or should i calculate it like the Zoom/pan imageview works? Also tell me if i should use different way to zoom and pan on a ImageView to make this work.. 来源: https://stackoverflow

ActionBar get current icon, findviewbyid

我们两清 提交于 2019-12-13 16:25:52
问题 I know how to set the icon of the actionbar, but how do I determine what icon is currently there? I don't see an accessor like getIcon , I think it is possible to find the icon view by id, since I've done this with the search widget in the actionbar, but I wouldn't know what id to call. 回答1: According to the source code of ActionBarView.HomeView you should be able to get ImageView of icon by android.R.id.home . So code may look like: ImageView imageView = (ImageView) findViewById(android.R.id

Are this textures?

别等时光非礼了梦想. 提交于 2019-12-13 15:46:15
问题 Now my app looks like this What I did http://i56.tinypic.com/6577zd.png (it is a image set as background and an ImageView. Every time the ImageView is touch, the background is changing, so the person is "rotating"). How can I mach some regions from image to look like this: What i Want http://i56.tinypic.com/2dipm3m.jpg Are this textures? I mention that there areas are changing when the person is rotating (background is changed)...so this means that the dimension of this images is changing

Loading images using Glide in Imageview

て烟熏妆下的殇ゞ 提交于 2019-12-13 15:25:52
问题 I am using Glide library for loading images in imageview and using the below code. Glide.with(mActivity) .load(img.getmGridViewImageUrl()) .placeholder(R.color.grey_light) .into(imageHolder.imageView); The placeholder with grey color gets visible until the image does not load but after the image get loads in imageview, the placeholder still take place and show some blank space after that image. How can I resolve this issue. Please help me if you have any idea here. 回答1: Try this code. When I

Out of memory error even after compressing the image

孤人 提交于 2019-12-13 15:13:58
问题 Here is my code please check and resolve my problem . In this i m getting image through image path i.e. i'm taking that in selectimage1 , selectimage2 ...goes on and after that i have taken the image in Bitmap and then decode and reduce its size den also getting out of memory error . so please help me to get out of it. thanks location=(TextView) findViewById(R.id.location); category=(TextView) findViewById(R.id.category); subcategory=(TextView) findViewById(R.id.subcategory); title=(EditText)

how to get view's position in coordinates?

限于喜欢 提交于 2019-12-13 14:27:10
问题 Hi I have an ImageView inside RelativeLayout, now how can I get X and Y position of imageview on screen ? I have tried getLocationOnScreen log(mPhoto.getLeft()); log(mPhoto.getScrollX()); log(mPhoto.getX()); log(mPhoto.getTranslationX()); but all of them returns 0. Above functions are called after progmatically setting imageview to center RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(mFaceWidth, mFaceHeight); lp1.addRule(RelativeLayout.CENTER_HORIZONTAL); lp1.addRule

image view Shared preferences

吃可爱长大的小学妹 提交于 2019-12-13 10:52:15
问题 I'm newbie in android. My question is how to set shared preferences in image view. I want to shared the image to another activity. Please help me because I'm stocked on it.. Please help me the explain me clearly and codes. Thank you. 回答1: The "standard" way to share data across Activities is usign the putExtraXXX methods on the intent class. You can put the image path in your intent: Intent intent = new Intent(this,MyClassA.class); intent.putExtra(MyClassA.IMAGE_EXTRA, imagePath);

thread random change image on imageview

跟風遠走 提交于 2019-12-13 10:47:22
问题 I'm Beginner. I want change my image on imageview in Android and that images are periodically changed after some interval. <LinearLayout android:id="@+id/la_01" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#eb68a3" android:orientation="vertical" > <ImageView android:id="@+id/ig1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center|center" android:src="@drawable/a03" /> </LinearLayout> public