【问题标题】:Placing imageviews in a circular manner by placing a center in android通过在android中放置一个中心以圆形方式放置imageviews
【发布时间】:2012-08-30 04:06:32
【问题描述】:

我想在android 4.1 中实现拖放,因为我想围绕中心点以圆形方式放置我的图标图像视图。 (图像视图可以完美实现拖放,位图有点复杂)

我尝试使用位图和绘画,但它不像我们在 android 4.1 中那样流畅。

Is there any method or way in android 4.1 by which i can place the imageviews in circular manner by giving the radius of the circle and number of sections it will get divide, its like a math question ?

看看这个link的拖放操作。

提前感谢您的帮助。

【问题讨论】:

    标签: android android-layout drag-and-drop android-imageview


    【解决方案1】:

    我已经在android中使用Math实现了。

    我正在分享我的部分代码:

    double xOffset = currentRadius * Math.cos(Math.toRadians(d));
    double yOffset = currentRadius * Math.sin(Math.toRadians(d));
    

    希望对你有所帮助。请关注here了解更多。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多