Click here to Skip to main content
15,442,081 members
Home / Discussions / Android
   

Android

 
AnswerRe: How do I fire up an Android Emulator in Android Studio? Pin
JakeClarke25-May-21 3:19
professionalJakeClarke25-May-21 3:19 
GeneralRe: How do I fire up an Android Emulator in Android Studio? Pin
priyamtheone27-May-21 6:10
Memberpriyamtheone27-May-21 6:10 
QuestionHow do I write an application that sends the origin and destination of the user to the Uber app? Pin
Nima Mazaheri 20211-May-21 22:17
MemberNima Mazaheri 20211-May-21 22:17 
AnswerRe: How do I write an application that sends the origin and destination of the user to the Uber app? Pin
Richard MacCutchan2-May-21 1:04
mveRichard MacCutchan2-May-21 1:04 
QuestionRe: How do I write an application that sends the origin and destination of the user to the Uber app? Pin
David Crow2-May-21 16:42
MemberDavid Crow2-May-21 16:42 
QuestionAndroid studio Pin
Zainab Hussaini14-Apr-21 0:51
MemberZainab Hussaini14-Apr-21 0:51 
AnswerRe: Android studio Pin
Richard Deeming14-Apr-21 1:30
mveRichard Deeming14-Apr-21 1:30 
QuestionKotlin Interface Listener inheritance Error Pin
leesungyoen5-Apr-21 18:38
Memberleesungyoen5-Apr-21 18:38 
package com.ishidakorea.test02

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import java.lang.Exception

class MainActivity : AppCompatActivity(), A.interA, Child.interChild
{
    override fun Child_EventFire()
    {
        // Child Class Listener
    }
    override fun A_SendPost()
    {
        // AA Class Listener
    }

    override fun onCreate(savedInstanceState: Bundle?)
    {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        var A1 = A()

    }


}

class A : Child(), Child.interChild {

    interface interA
    {
        fun A_SendPost()
    }

    lateinit var LinstenerA : A.interA

    init {
        LinstenerA = this@A as A.interA // Exception
    }

    fun FireA()
    {
        if (LinstenerA != null)
            LinstenerA.A_SendPost()
    }
    
    override fun Child_EventFire()
    {

    }

    
}

open class Child {

    interface interChild
    {
        fun Child_EventFire()
    }

    lateinit var LinstenerB : interChild

    init {
            LinstenerB = this@Child as interChild // OK
    }

    fun Fire()
    {
        if (LinstenerB != null)
            LinstenerB.Child_EventFire()
    }



}



An error occurs while creating a new listener from a parent class that inherits a child class that has a listener.

Why is that?

If you know anyone, please advise.

QuestionRe: Kotlin Interface Listener inheritance Error Pin
Richard MacCutchan5-Apr-21 21:19
mveRichard MacCutchan5-Apr-21 21:19 
AnswerRe: Kotlin Interface Listener inheritance Error Pin
SeanChupas6-Apr-21 2:14
MemberSeanChupas6-Apr-21 2:14 
QuestionRe: Kotlin Interface Listener inheritance Error Pin
David Crow6-Apr-21 2:22
MemberDavid Crow6-Apr-21 2:22 
QuestionImplement AsyncTask Pin
paradox029-Mar-21 22:02
Memberparadox029-Mar-21 22:02 
QuestionRe: Implement AsyncTask Pin
David Crow8-Apr-21 4:33
MemberDavid Crow8-Apr-21 4:33 
AnswerRe: Implement AsyncTask Pin
James_Carter42023-May-21 4:14
MemberJames_Carter42023-May-21 4:14 
QuestionAndroid Studio oddity Pin
David Crow3-Mar-21 4:08
MemberDavid Crow3-Mar-21 4:08 
AnswerRe: Android Studio oddity Pin
Richard MacCutchan3-Mar-21 4:52
mveRichard MacCutchan3-Mar-21 4:52 
Questionhow to add a button in one the navigation drawer fragment so that when the user click he is directed to another sub fragment of that previous fragment Pin
George S Mulbah II2-Mar-21 15:55
MemberGeorge S Mulbah II2-Mar-21 15:55 
QuestionRe: how to add a button in one the navigation drawer fragment so that when the user click he is directed to another sub fragment of that previous fragment Pin
David Crow3-Mar-21 2:35
MemberDavid Crow3-Mar-21 2:35 
QuestionXamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 6:13
professionalKevin Marois16-Feb-21 6:13 
AnswerRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 6:19
mveRichard Deeming16-Feb-21 6:19 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 9:36
professionalKevin Marois16-Feb-21 9:36 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 22:08
mveRichard Deeming16-Feb-21 22:08 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois17-Feb-21 5:45
professionalKevin Marois17-Feb-21 5:45 
QuestionI cannot play videos Google Drive, the error “Whoops! there was a problem playing this video” appears. Pin
Otis Ryder24-Jan-21 22:49
MemberOtis Ryder24-Jan-21 22:49 
QuestionLooking for a collaborator on a group project. Pin
FelipeRodas8624-Jan-21 9:46
MemberFelipeRodas8624-Jan-21 9:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.