imageview

Rounded corners for an Imageview in android

为君一笑 提交于 2019-12-04 23:54:29
问题 I have a textview and imageview inside a linearlayout. Textview is at top and imageview at bottom. I used below lines to have rounded corners for linearlayout. But imageview corners are not rounding. I see only top corners of linearlayout are rounding. How can i have rounded bottom corners of imageview? ( I see all the corners are rounded if i remove imageview) rounded_corners.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android

Set image from android.R.drawable in image view android

心已入冬 提交于 2019-12-04 23:40:30
i know how to set image/icon from our res/drawable <ImageView android:id="@+id/ImageSearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/android_green_3d"/> If we set it directly from the code: imageView1.setImageResource(R.drawable.android_green_3d); But we can also get the icon from android.R.drawable like this: imageView1.setImageResource(android.R.drawable.ic_menu_more); How to set image/icon in xml id the source is android.R.drawable? Anyone know? Thanks in advance. Thats easy: change @drawable/ to @android:drawable/ . Code completion

Android :How to load image dynamically from server by its name from SQlite

…衆ロ難τιáo~ 提交于 2019-12-04 23:37:33
问题 I am new to android and I'm facing an issue while displaying image from server based its name from Sqlite ie: I stored only image name (text) in SQLite database (column name images) and I want to load images from Server based on the sqlite image name the image want to display in imageview In server I create a folder like Cars in that folder I store images with car names..but in sqlite I just add a carname in text format with .jpeg I have two column names in my DB: first is Car name Second is

Getting black ImageView using Picasso and Glide

夙愿已清 提交于 2019-12-04 22:12:39
The problem I'm writing an Android app that's supposed to have a "Slideshow" feature on it. I've found this nice library , based on Picasso, that does exactly what I wanted, and it worked just fine most of the times. Problem is, sometimes my images are not loaded into the slide ImageView ... It only shows a "black canvas" as you can see on the screenshot below. I am loading the image from a local resource from my drawables. Sometimes it happens on Portrait mode, sometimes on Landscape mode. It doesn't matter which image I use, sometimes that "blackness" happens. EDIT: I'm using Android 5.0.2

How to show thumbnail from image path? [closed]

。_饼干妹妹 提交于 2019-12-04 21:58:41
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . Closed 6 years ago . How can I show a thumbnail from a fixed image path in an ImageView? you can create Image thumbnail from the image path as: public Bitmap getbitpam(String path){ Bitmap imgthumBitmap=null; try { final int THUMBNAIL_SIZE = 64; FileInputStream fis = new FileInputStream(path); imgthumBitmap = BitmapFactory

No IMvxImageHelper registered

萝らか妹 提交于 2019-12-04 20:48:42
I use mvvmcross and can not bind to image URL. Error: No IMvxImageHelper registered - you must provide an image helper before you can use a MvxImageView <Mvx.MvxImageView p1:id="@+id/imgArticle" p1:layout_width="49dp" p1:layout_height="49dp" p1:layout_marginLeft="5dp" p1:layout_marginTop="5dp" local:MvxBind="ImageUrl Image, Converter = Image" p1:layout_marginBottom="5dp" p1:background="#ffff0000" /> My Model: public Guid Id { get; set; } public string Name { get; set; } public string Image { get; set; } public decimal Price { get; set; } Install the DownloadCache plugin and MVVMCross File

Android - Add multiple tags to ImageView

瘦欲@ 提交于 2019-12-04 20:18:31
I am new at android programming and want to create an application in which I can add multiple custom tags to an displayed Image. I researched a bit and found out about setTag() method of ImageView. But it does mention if it allows multiple tagging. Also is there any way that those tags to remain visible (along with appropriate tagged position) on the image? Will I require an SurfaceView or GridView for this? Sources : Android Image View android-Image View set Tag Thank you. Instead of looking for multiple tags you can use a class MyTag as follows to tag more than one data to a view public

Android:set ImageView dynamically?

末鹿安然 提交于 2019-12-04 20:18:27
I'm trying to download an image, and create an ImageView dynamically and add it to my layout, but it won't display the image. Here is my code: ImageView image = new ImageView(this); LinearLayout.LayoutParams vp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); image.setLayoutParams(vp); image.setScaleType(ImageView.ScaleType.CENTER_CROP); image.setMaxHeight(50); image.setMaxWidth(50); image.setImageDrawable(avatar); theLayout.addView(image); maybe I need to refresh the layout after I add the ImageView? How do you "refresh"? Nirav Dangi Try the following code,

How I can update image of fresco SimpleDraweeView, if it was set once by setImageURI

徘徊边缘 提交于 2019-12-04 20:10:25
问题 I am using Facebook Fresco library and SimpleDraweeView for displaying avatar image from file: Uri avaURI = Uri.fromFile(new File(getCacheDir(), Constants.AVA_FILE_NAME)); simpleDrawee.setImageURI(avaURI); But what if I changed file with picture (deleted previous file and created the same one with new image), how can I update (refresh) SimpleDraweeView? Its still display the old version of image. (I tried to disable cache by Fresco.getImagePipeline().evictFromMemoryCache(avaURI); but it didn

Car animation rotating wheels

删除回忆录丶 提交于 2019-12-04 19:52:11
I am working in an app that shows different cars and the user needs to choose one. When you press on next the car moves out of the screen and the new one comes in. My resources are: Car's body Car's wheel (I need them to be separated because when the car moves I need to rotate the wheels) I wanted to avoid AbsoluteLayout so my CarView extends `RelativeLayout. Here's the code: public class CarView extends RelativeLayout { private ImageView mBody; private ImageView mLeftWheel; private ImageView mRightWheel; private float mScale; public CarView(Context context, AttributeSet attrs) { super(context