Skip navigation

Define custom callback methods

Define custom callback methods: Java Design Patterns and APIs for Android
Define custom callback methods: Java Design Patterns and APIs for Android

Java callback methods are used to implement event handlers and other common Android programming elements. These sorts of callbacks can be used in Android apps whenever you want Java objects to communicate with each other. For example, you might have an activity whose layout contains a fragment. When something happens within the fragment, you might need to communicate that to the containing activity. In some programming environments this might be done with an event dispatching system. The fragment might dispatch an event, and the container would listen for and respond to the event. In Android though, you typically implement this with a code in the fragment class calls a method in the containing object - a callback.

Resume Transcript Auto-Scroll
Skill Level Beginner
2h 48m
Duration
36,429
Views
Show More Show Less
Skills covered in this course
Developer Mobile Apps Programming Languages Java

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start Your Free Trial Now

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now