在Android界面 [英] Interface in Android

查看:90
本文介绍了在Android界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写在android的一个表格布局包含图像和视频视图。

I have written a table layout in android that contains image and video view.

我想写在Android的界面,将拍摄的图像以及数据和视频,而不会干扰我的布局。

I want to write an interface in android which will take the images as well as data and videos without disturbing my layout.

此数据可以来自任何形式的和从任何来源,并具有通过所述接口被提供给布局

This data can come in any form and from any source and has to be supplied to the layout through the interface.

我应该如何写一个程序界面,我已经开发了Android的布局?

How should I write a program interface for the layout that I have developed in android?

推荐答案

首先,你需要两班。

  1. 在头等舱将表现为活动在您需要显示的布局和实现的接口或抽象类。
  2. 第二类将负责利用获取的数据在后台 的AsyncTask 将于接口的对象作为输入的构造函数和任务时,在这个类中完成,则它会通过调用接口的对象由第一类方法传递了更新头等舱通过传递数据。
  1. First class will behave as Activity in which You need to display the layout and implemented the interface or abstract class.
  2. Second class will be responsible for fetching the data in background using AsyncTask which will take object of interface as input in constructor and when task in this class in completed then it will update first class by calling the method of object of interface passed by first class by passing data.

接口应该定义和实施活动类和方法,将更新一流的用户界面。

Interface should be defined and implemented in Activity class and method of which will update the UI of first class.

请让我知道如果u需要一些code有助于

Please let me know if u need some code help

这篇关于在Android界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆