如何在android中的活动中长时间点击图像
有了这段代码,我可以在我的活动中显示图库中的图像如何在android中的活动中长时间点击图像,android,layout,android-activity,Android,Layout,Android Activity,有了这段代码,我可以在我的活动中显示图库中的图像 @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.message_main); Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTE
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.message_main);
Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
}
布局如下所示
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</RelativeLayout>
我不知道怎么做的是把长时间的点击连接到一个图像上?因此,当用户在我的活动中长时间单击图像时,我希望捕获单击的图像并对其进行处理。查找它的路径、图像类型等。根据我的布局,我不确定我将连接什么来捕获这一长时间的点击?您需要使用“图库视图”的关联菜单 有关关联菜单的详细信息: 希望这有帮助