0

i manage to do a imageview that allow user drag edge/ side to resize the imageview, currently i select the imageview by using the picasso library, is it possible to implement the drag edge/side to resize the imageview by using picasso library or need to implement it by other library, any suggestion to solve this problem?

MainActivity

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ImageView imageView = (ImageView) findViewById(R.id.imageview);
    Picasso.with(this)
            .load("http://i.imgur.com/DvpvklR.png")
            .placeholder(R.drawable.placeholder) // optional
            .error(R.drawable.error)         // optional
            .resize(450, 500)               // optional
            .rotate(90)                    // optional
            .into(imageView);

  }
}
Piyush
  • 2,589
  • 6
  • 38
  • 77
Tang Weiming
  • 47
  • 2
  • 9
  • dont resize with picasso, just hard code your image view with height and width, and set its scale type fitxy , when ever user drags the image view programatically increase/decrease its height or width accordingly – Manohar Feb 17 '17 at 04:57
  • @Redman thanks but how can i detect the user is dragging the edge/side of imageview? – Tang Weiming Feb 17 '17 at 05:00
  • have a look at http://stackoverflow.com/questions/4255859/touch-and-drag-image-in-android – Manohar Feb 17 '17 at 05:11
  • @Redman i tried the code , how to apply the ballView to the imageView so, the imageview edge contain 4 ballview? – Tang Weiming Feb 17 '17 at 06:31

0 Answers0