Android中的回调?

Callback in Android?(Android中的回调?)
本文介绍了Android中的回调?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android应用开发中,我经常会在很多地方遇到CallBack这个词.我想知道从技术上告诉我们意味着什么——以及如何设法在应用程序中使用 callback.我需要一个指南来理解和使用它.

In Android application development, I frequently go through the word CallBack in many places. I want to know what it means to tell us technically - and how I can manage to use the callback in applications. I need a guide to understand it and use it.

推荐答案

我想知道这是什么意思,告诉我们在技术上

i want to know what it means, tell us technically

http://en.wikipedia.org/wiki/Callback_%28computer_science%29

在没有函数值参数的面向对象编程语言中,例如Java,可以通过传递一个抽象类或接口来模拟[回调],其中接收者将调用一个或多个方法,而调用端提供一个具体的实现.这些对象实际上是一组回调,以及它们需要操作的数据.它们在实现各种设计模式(如访问者、观察者和策略)中很有用."

"In object-oriented programming languages without function-valued arguments, such as Java, [callbacks] can be simulated by passing an abstract class or interface, of which the receiver will call one or more methods, while the calling end provides a concrete implementation. Such objects are effectively a bundle of callbacks, plus the data they need to manipulate. They are useful in implementing various design patterns such as Visitor, Observer, and Strategy."

我如何管理回调应用

我不知道这是什么意思.

I have no idea what this means.

这篇关于Android中的回调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)