imageview

GenericMotion - Action Down not firing

纵饮孤独 提交于 2019-12-25 04:11:39
问题 I want to trace the whole movement of a finger that started by touching my ImageView. I found that GenericMotion event should be the correct one to use. What am I supposed to do (or to avoid) to get Actions Down, Move and Up in GenericMotion event? I get only HoverEnter, HoverMove and HoverExit actions, even if I start with touching the center of my ImageView. Android: OnTouch, MotionEvent.ACTION_MOVE is not recognized? Here I learned that without handling Down action I can't get the

Android Jsoup - NullPointerException when parsing images

蓝咒 提交于 2019-12-25 03:24:34
问题 I am using Jsoup in my Android app to get images from the internet but an getting a NullPointerException. Java: public class CollegeInfo extends Activity{ TextView body; ImageView image1;ImageView image2;ImageView image3;ImageView image4; ImageView image8;ImageView image7;ImageView image6;ImageView image5; String college; String ataglance; double satHigh; double satLow; Bitmap[] bitmap; String[] imgSrcs;InputStream[] input; @Override protected void onCreate(Bundle savedInstanceState) { //

SmartImageVIew, I would like to force refresh (and not caching)

不羁的心 提交于 2019-12-25 02:54:07
问题 I am using this useful class that allow smart online downloading of images (from the loopj guys). It works fine, but i cannot force the "refresh" in the case of same name images that could have been changed in the server (example: I update my profile picture). So at the moment I am forcing the brutal delete of my app cache dir before the setImageUrl(). It works, and some FileNotFoundException is raised. No big deal, but I hate having something that works "without really working", I don't know

How add Size and Position to ImageView in UITableView Cell?

拜拜、爱过 提交于 2019-12-25 02:44:34
问题 I added a image to my UITableView Cell: cell.imageView!.image = UIImage(named: "Default.png") Everything works, the image is displayed. Now I want to give a custom size and position for the image, so I try it with this code: cell.imageView!.frame = CGRect(x: 29, y: 17, width: 14, height: 13) But for any reason it doesn't work. Any advices? 回答1: If your position will not change You can create frame in your TableViewCell class TableViewCell: UITableViewCell { @IBOutlet weak var imageView:

Add border to getRoundedCornerBitmap android

筅森魡賤 提交于 2019-12-25 02:29:58
问题 In getRoundedCornerBitmap(Context context, Bitmap input, int pixels , int w , int h , boolean squareTL, boolean squareTR, boolean squareBL, boolean squareBR ) method below i attempted to display rounded image but when i try to add a border around the circle nothing is displayed. How can i add border to this rounded method. public static Bitmap getRoundedCornerBitmap(Context context, Bitmap input, int pixels , int w , int h , boolean squareTL, boolean squareTR, boolean squareBL, boolean

Saving picture and loading in an imageview

会有一股神秘感。 提交于 2019-12-25 02:26:42
问题 If I take a picture it is shown in the image view.This works well. But how can I save the photo additional on the hard drive? Take he the size of the camera setting? public class Note extends Activity { TextView t; ImageView iv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.note); iv=(ImageView) findViewById(R.id.imageView); Button btn = (Button) findViewById(R.id.photo); btn.setOnClickListener(new View

How to display Images in ListView android

别等时光非礼了梦想. 提交于 2019-12-25 02:21:07
问题 I have been looking around for examples on how to do this. Cam across an approach that used SimpleAdapter and HashMaps here on StackOverflow. This is my code. It's not working. All I can see is an empty row of a list. listItems = new ArrayList<HashMap<String,Object>>(); HashMap<String,Object> listData1 = new HashMap<String,Object>(); HashMap<String,Object> listData2 = new HashMap<String,Object>(); image_1 = getResources().getDrawable(R.drawable.camera_icon_focus_dim); image_2 = getResources()

ImageView - implementing gestures (pinch zoom, double tap) compatible with ViewPager (just like Android Gallery)

帅比萌擦擦* 提交于 2019-12-25 02:16:02
问题 I was looking for an effective way to implement gestures option to ImageView with ViewPager. I tried some examples, but they are not working well (e.g. pinch zoom actually is not zooming where I want to). In my app I need pinch zooming, double tap zoom and draging zoomed image. What is the fastest and easiest way to make it all working well? 回答1: you can try this open sources project: https://github.com/jasonpolites/gesture-imageview 来源: https://stackoverflow.com/questions/12517306/imageview

android imageview setvisibility

落爺英雄遲暮 提交于 2019-12-25 02:07:38
问题 i want to change visibility of imageview if value= x but i have error message on eclipse. here is part of my java if (success == 1) { // products found // Getting Array of Products products = json.getJSONArray(TAG_PRODUCTS); // looping through All Products for (int i = 0; i < products.length(); i++) { JSONObject c = products.getJSONObject(i); // Storing each json item in variable String id = c.getString(TAG_PID); String name = c.getString(TAG_NAME); String price = c.getString(TAG_PRICE);

Inserting images into TableView rows - JavaFX

谁说胖子不能爱 提交于 2019-12-25 01:55:32
问题 Just wondering how to insert an image into cells of a TableView in JavaFX. I have read other peoples solutions on this site but struggle a tad understanding them as I think their set up is a bit different to mine. Pretty much I am making a game library, and in the tableview I want an icon of the game. The data is being read from a .dat file (in which this case a String of the icon's URL), and all the strings in the rows work. The column is made @FXML private TableColumn<Game, Image> iconCol;