imageview

Why Glide is not loading https images in android?

岁酱吖の 提交于 2019-12-24 05:16:32
问题 I am trying to load https images in imageview using Glide. The image is not loading, but if I provide some local image (ex. R.drawable.error_image), it loads. imagePath = "https://s-media-cache-ak0.pinimg.com/736x/d3/6b/83/d36b83e986e500aa7f39c722970f1f97.jpg"; // Sample image took from internet Glide.with(this) .load(imagePath) .into(landingImage); compile 'com.github.bumptech.glide:glide:4.0.0-RC0' I tried to search in SOF also but did't get fix. Give suggestions thanks in advance. 回答1: Try

custom image view android

佐手、 提交于 2019-12-24 04:37:24
问题 My custom view looks as below package com.mypackage; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.RectShape; import android.widget.ImageView; public class CustomDrawableView extends ImageView { // private ShapeDrawable mDrawable; public int imageid = 0; ShapeDrawable bgDrawable = null; List<ShapeDrawable>

Drag and Drop for imageview not working

一世执手 提交于 2019-12-24 04:34:25
问题 My RelativeLayout has an image. I am just trying to make it draggable in the entire layout.The issue is that every time I drag and drop, it goes back to the original position. Here is my drag_layout.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mainView" android:background="@drawable/bg_animation" tools:context="com.example

4 imageViews in the center like 2 lines * 2 rows for all devices

这一生的挚爱 提交于 2019-12-24 04:25:26
问题 i'm trying to put 4 imageViews like they was in 2 lines * 2 rows: I did this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/accueil"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/font" android:src="@drawable/fond_menu" android:scaleType="centerCrop"

Android - Fit ImageView to ListView

不问归期 提交于 2019-12-24 04:17:52
问题 I want to fit ImageView inside a ListView row so that it fits to the edge of device's screen. This is my current layout: <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <ListView android:layout_width="fill_parent" android:layout_height="fill_parent" android:smoothScrollbar="true" android:id="@android:id/list" /> </RelativeLayout> In the custom_row.xml: <RelativeLayout android:layout_width="fill

Android ProgressBar inside ImageView

大兔子大兔子 提交于 2019-12-24 04:09:48
问题 I have an activity that fills a listview with data via an asynctask..additional i am loading a picture in the background...while the picture is loading, i would like to show a progressbar instead of a Default Icon in the imageview. I searched for any examples etc. in the internet but I couldnt find anything useful. I only found one Response which says that you have to make a framelayout with an imageview and a progressbar and Change the visibility during the loading process... I hoped there

java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso

荒凉一梦 提交于 2019-12-24 03:32:48
问题 I try to use Picasso for the first time like in the official site example: private void setItemBgImageUsingPicasso(View convertView) { String imageUrl = getImageUrlFromOffer(convertView); ImageView offerImage = ((ImageView) convertView .findViewById(R.id.offerImage)); Picasso.with(mOffersListActivity).load(imageUrl).into(offerImage); } but I get this error: 08-09 17:37:43.309: E/AndroidRuntime(17821): java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso 08-09 17:37:43.309: E

how to set image's top and bottom in same size for android?

╄→гoц情女王★ 提交于 2019-12-24 00:59:50
问题 I want to display image in center and top and bottom in same size refer bellow screens,anybody know please give the code to me... Thanks All 回答1: Use android:scaleType="centerInside" or ImageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE) 来源: https://stackoverflow.com/questions/3653431/how-to-set-images-top-and-bottom-in-same-size-for-android

Android - Load Thumbnail from Website URL using Glide/Picasso

纵然是瞬间 提交于 2019-12-24 00:34:22
问题 I'm trying to load a thumbnail for an article on the web using Glide, but it returns an empty field. Unlike other examples this URL does not directly link to a PNG/JPG etc, rather its a website link from which I require it to load the default thumbnail. The ImageView has been set & initialised properly. I have used Glide & Picasso in separate attempts, but it the ImageView is blank. Snippet ivGlide = (ImageView) findViewById(R.id.ivGlide); String uriLoad = "http://www.recode.net/2016/7/26

Android Studio How to check which Imageview has clicked and assign an Int value to it?

好久不见. 提交于 2019-12-24 00:22:34
问题 ActivityOne I have 12 Imageviews. User click on either 1 of them. If they click ImageView 1, we assign a int value to it (image_id=1; ) ActivityTwo Use a If else statement to check which image has they clicked Intent result_intent=getIntent(); if (image_id==1) { text.setText("U have clicked image "+image_id); } I need the int value in ActivityTwo as I need to calculate sth. Anyone can help? Thx 回答1: @gosulove setOnClickListener on your all ImageViews Like this In your Activity 1 ImageView1