【问题标题】:selecting an Image from Grid and displaying it in Gallery View in android application从 Grid 中选择图像并将其显示在 android 应用程序的 Gallery View 中
【发布时间】:2012-11-28 02:58:26
【问题描述】:

我想从 Activity 的 GridView 中选择一个 Image,并将其位置发送到 Gallery View 以将其显示为 Gallery 中的 CurrentView。我能够创建 Gallery Activity 和 GridView Activity。但是,当画廊活动启动时,我无法选择画廊当前图像位置。意味着我在第一个活动中的 GridVIew 中选择的项目应该是画廊活动中的当前可见项目。 谁能告诉我一种在图库活动中选择当前显示的图像视图的方法。

我想我需要对我的图库适配器进行一些更改。但我不清楚。请提供任何 API 代码 sn-ps。

【问题讨论】:

    标签: android image-gallery android-gallery


    【解决方案1】:

    找到答案,简单的 API:

    gallery.setSelection(currentImage);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-12
      • 2017-01-17
      • 1970-01-01
      相关资源
      最近更新 更多