imageview

ViewPager + Picasso

旧巷老猫 提交于 2019-12-04 07:15:19
I'm creating a Image Slider using Picasso + Viewpager. I am able to swipe the slider base on the image size(counts). But no images has been loaded tho i can swipe the screen. What is wrong with my codes? In my MainActivity, I get the links of my images. then set the adapter Like this. viewPager = (ViewPager)findViewById(R.id.view_pager); viewPagerAdapter = new ViewPagerAdapter(MainActivity.this,IMAGES); viewPager.setAdapter(viewPagerAdapter); IMAGES=Arrays of Links(For images). My ImagePager_layout.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android

Difference between src and background for image view [duplicate]

让人想犯罪 __ 提交于 2019-12-04 06:54:36
问题 This question already has answers here : What is the difference between src and background of ImageView (3 answers) Closed 5 years ago . I have two imageviews. I have set background for one image view and I have set src for one image view . But both are looking differnt and also when i press the imageview with background set it is not showing the selection. can anyone explain why this happens ? <ImageButton android:layout_width="250dp" android:layout_height="100dp" android:background="

Android: placing an ImageView on an exact location on the screen

我们两清 提交于 2019-12-04 06:52:06
问题 I would like to use getLocationOnScreen to get the location of an ImageView, and then I would like to place another ImageView exactly at that place. Assume they both are in the same layout. When the app starts only imgv1 is visible. The user can move and rotate that image. Then the user can press a button and second image, imgv2 should be placed exactly on top of imgv1 so it covers it. Both imgv1 and imgv2 have the same size. For example, assume I have imgv1 and imgv2 as: ImageView imgv1,

Jumping ImageView while dragging. getX() and getY() values are jumping

我的未来我决定 提交于 2019-12-04 06:31:06
I've created an onTouchListener for dragging Views. Images drag smoothly if I use getRawX() and getRawY() . The problem with that is the image will jump to the second pointer when you place a second pointer down then lift the first pointer. This onTouchListener attempts to fix that issue by keeping track of the pointerId . The problem with this onTouchListener is while dragging an ImageView, the ImageView jumps around pretty crazily. The getX() and getY() values jump around. I feel like I'm doing this correctly. I don't want to have to write a custom view for this because I've already

Image not showing on image view

纵然是瞬间 提交于 2019-12-04 06:08:53
问题 I am trying to set image on imageview but image is not show. I am reading image url from json data and then trying to set it on ImageView but my image is not visible. No any exception occur. Here is my code HotelList.class static final String TAG_DISHIMAGEURL = "dishimageurl"; ...... String imageUrl = dishResult.getString(TAG_DISHIMAGEURL); map.put(TAG_DISHIMAGEURL, imageUrl); ..... dishimageurl1 = hm.get(TAG_DISHIMAGEURL).toString(); intent.putExtra("background", dishimageurl1); HotelDetails

How to display image from database in CodeIgniter?

会有一股神秘感。 提交于 2019-12-04 04:57:20
I am using CodeIgniter 2.1.0 and MySQL database. I have uploaded an image through a form and successfully stored it in a uploads directory and I have also successfully stored the full path of the image in my database. but i am having problem with showing the image by calling the full path from my database. Here is my code for the upload: $image_path = realpath(APPPATH . '../uploads'); $config = array( 'allowed_types' => 'jpeg|png|gif|jpg', 'upload_path' => $image_path, 'max_size' => 2097152, 'overwrite' => TRUE, 'file_name' => '_' . $i . '_' ); $this -> load -> library('upload', $config); When

Animate image along path on Android? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-12-04 04:50:20
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Android, move bitmap along a path? Is there a way to animate an ImageView's position along a path on the Android as with a CGPath on the iPhone? I have scoured the web for a solution to this, but no one has even seemed to ask about it. I didn't see anything in the Android docs describing this functionality. 回答1: I created a subclass of Animation named PathAnimation, which can animate along a path. You can just

how to scale an image in an ImageView so that it “fits”

跟風遠走 提交于 2019-12-04 03:01:44
问题 I want to scale an image in an ImageView in the following way. The ImageView has some dimensions Width (W) and Height (H). The image I'm putting into the image view could be smaller or bigger than WxH. I want it to scale while preserving aspect ratio to fill WxH space. It seems like the closest thing to what I want is android:scaleType="centerInside", but what I'm seeing is that if the image is smaller than WxH, it will put a small-unscaled version of that image in the center of the ImageView

JavaFX imageview real coordinates translateX and translateY

随声附和 提交于 2019-12-04 02:42:48
问题 And why the translateX and translateY is bad position on my scene ? I start on coordinate x = 100 y = 200 in real my real coordinate y = -24.8 ... why ? I need real coordinates when is my ImageView is ? primaryStage.setTitle("Title"); Group root = new Group(); Scene scene = new Scene(root, 800, 600, Color.WHITE); // border.prefHeightProperty().bind(scene.heightProperty()); //border.prefWidthProperty().bind(scene.widthProperty()); Image im = new Image("Images/universe.jpg", 800, 600, true,

Rotate Frame layout which contains dynamic buttons

☆樱花仙子☆ 提交于 2019-12-04 02:32:39
I have a Framelayout which add four imageview at runtime as well in center it contains main image with which user can perform different action but i face the problem with rotate layout view currently on touch of rotate button i'm doing this public void setRotateListener() { mRotateImage.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { float x = event.getX(0); float y = event.getY(0); float theta = getTheta(x, y); switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_POINTER_DOWN: theta_old = theta; break; case