android-imageview

setText Textview from custum imageview

▼魔方 西西 提交于 2019-12-14 04:11:25
问题 I have an activity which has custom imageView. in imageView, I want to call a method from the activity, and that method wants setText Textview. is it possible? I have done these code but I've encountered an error. MainActivity: package com.example.helloworld; import android.os.Bundle; import android.app.Activity; import android.util.Log; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R

android show image in default gallery viewer

早过忘川 提交于 2019-12-14 03:43:20
问题 I am loading some images into my activity using an AsyncTask as clickable images. On click I need to open that image in the default image viewer of the android. I am new to android. Can any one please help. My code looks like ImageView image = new ImageView(this); String ed="http://www.domain.com/image.jpg"; image.setTag(ed); DownloadImagesTask td=new DownloadImagesTask(this); td.execute(image); image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.v(

Centering the Matrix of ImageViews to the Center of the Screen Dynamically

爷,独闯天下 提交于 2019-12-14 03:34:15
问题 This is my Layout File: RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/imageLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:layout_gravity="center" android:background="@color/silver"> <TextView android:id="@+id/bottom" android:layout_width="match_parent" android:layout_height="50dp" android:layout_alignParentBottom="true" android:layout

Xamarin.Andoid: Merge ImageView with CanvasView

半腔热情 提交于 2019-12-14 03:16:47
问题 I am using the FingerPaintCanvasView from this xamarin sample. I am working with 2 layers . The first layer is an ImageView i want to draw on. The second layer is the PaintCanvasView to draw. <RelativeLayout android:layout_height="match_parent" android:layout_width="match_parent"> <ImageView android:id="@+id/markImageImageView" android:layout_height="wrap_content" android:layout_width="wrap_content"/> <fingerpaint.FingerPaintCanvasView android:id="@+id/canvasMarkMeta" android:layout_width=

How to get Image URL from a ImageView

廉价感情. 提交于 2019-12-13 23:19:24
问题 I have no idea how to get an Image URL from already settled ImageView . Actually, I have an ImageView over which picture is set from a URL . Now I have a button on that button_clik I have to fetch that ImageView URL . Is it possible or not ? Thanks in advance. 回答1: u cannot get the image url from the imageview...infact u will have to use the alternate. For example u might be saving the urls for the imageview in some array...u need to get the position of the imageview clicked and using that

How to refresh imageview in android

前提是你 提交于 2019-12-13 19:52:04
问题 I want to refresh imageview on bytearray received from socket. new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub while (!socket.isClosed()) { imgArray = receiveImagebytes(); } } }).start(); try { Thread.sleep(5000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } while (!socket.isClosed()) { runOnUiThread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub imageView

Upload imageview to server

那年仲夏 提交于 2019-12-13 18:16:55
问题 public class upload extends Activity { private static final int CAMERA_REQUEST = 1888; private ImageView imageView; String selectedPath = ""; TextView textTargetUri; ImageView targetImage; InputStream is; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); this.imageView = (ImageView)this.findViewById(R.id.targetimage); Button photoButton = (Button) this.findViewById(R.id.takeimage); photoButton.setOnClickListener(new View.OnClickListener() {

animate scaleType=“centerCrop” in ImageView

安稳与你 提交于 2019-12-13 15:09:31
问题 Is there a way to animate scaleType="centerCrop"? I need to scale my image to certerCrop so the image can cover the entire area of the imageView. But I need to animate it to show the user the actual look of the image before it is being scaled I was planning to do it this way imageView.animate().scaleX(2.0f).setDuration(2000) but the problem is that I will be doing this on multiple image for a slide show so each image will have a different size and orientation. I also found this library https:

app widget setImageViewUri does not update the image

妖精的绣舞 提交于 2019-12-13 11:58:51
问题 i have an app widget, which contains only one imageview. i redraw that image and store it as png in apps's private memory and then i set the RemoteViews' image with the uri (widget.setImageViewUri(R.id.widget_icon, uri)) instead of sendding the bitmap it self, because in very rare situations i get !!! FAILED BINDER TRANSACTION !!! the problem is, that as the image changes over time, the widget's image does not change. i checked the saved png with root explorer and it is updated correctly. but

Android onClickListener NullPointerException

我怕爱的太早我们不能终老 提交于 2019-12-13 11:28:31
问题 all. I've searched, but can't find anything that helps me fix this problem. My app quits almost immediately on launch due to a NullPointerException. I suspect maybe the problem is that I'm using a drawable image (ImageView) rather than a button (View) as the thing you click on. Thanks for any help. This has been driving me bonkers for hours! Code is as follows: package com.example.imageswitchermk2; import android.app.Activity; import android.os.Bundle; import android.view.View; import android