Click here to Skip to main content
15,850,919 members
Home / Discussions / Android
   

Android

 
AnswerRe: How do I fire up an Android Emulator in Android Studio? Pin
JakeClarke25-May-21 4:19
professionalJakeClarke25-May-21 4:19 
GeneralRe: How do I fire up an Android Emulator in Android Studio? Pin
priyamtheone27-May-21 7:10
priyamtheone27-May-21 7: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 23:17
Nima Mazaheri 20211-May-21 23: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 2:04
mveRichard MacCutchan2-May-21 2: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 17:42
David Crow2-May-21 17:42 
QuestionAndroid studio Pin
Zainab Hussaini14-Apr-21 1:51
Zainab Hussaini14-Apr-21 1:51 
AnswerRe: Android studio Pin
Richard Deeming14-Apr-21 2:30
mveRichard Deeming14-Apr-21 2:30 
QuestionKotlin Interface Listener inheritance Error Pin
leesungyoen5-Apr-21 19:38
leesungyoen5-Apr-21 19: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 22:19
mveRichard MacCutchan5-Apr-21 22:19 
AnswerRe: Kotlin Interface Listener inheritance Error Pin
SeanChupas6-Apr-21 3:14
SeanChupas6-Apr-21 3:14 
QuestionRe: Kotlin Interface Listener inheritance Error Pin
David Crow6-Apr-21 3:22
David Crow6-Apr-21 3:22 
QuestionImplement AsyncTask Pin
paradox029-Mar-21 23:02
paradox029-Mar-21 23:02 
QuestionRe: Implement AsyncTask Pin
David Crow8-Apr-21 5:33
David Crow8-Apr-21 5:33 
AnswerRe: Implement AsyncTask Pin
James_Carter42023-May-21 5:14
James_Carter42023-May-21 5:14 
QuestionAndroid Studio oddity Pin
David Crow3-Mar-21 5:08
David Crow3-Mar-21 5:08 
AnswerRe: Android Studio oddity Pin
Richard MacCutchan3-Mar-21 5:52
mveRichard MacCutchan3-Mar-21 5: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 16:55
George S Mulbah II2-Mar-21 16: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 3:35
David Crow3-Mar-21 3:35 
QuestionXamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 7:13
professionalKevin Marois16-Feb-21 7:13 
AnswerRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 7:19
mveRichard Deeming16-Feb-21 7:19 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 10:36
professionalKevin Marois16-Feb-21 10:36 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 23:08
mveRichard Deeming16-Feb-21 23:08 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois17-Feb-21 6:45
professionalKevin Marois17-Feb-21 6:45 
QuestionI cannot play videos Google Drive, the error “Whoops! there was a problem playing this video” appears. Pin
Otis Ryder24-Jan-21 23:49
Otis Ryder24-Jan-21 23:49 
QuestionLooking for a collaborator on a group project. Pin
FelipeRodas8624-Jan-21 10:46
FelipeRodas8624-Jan-21 10: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.