Click here to Skip to main content
15,867,308 members
Home / Discussions / Android
   

Android

 
GeneralRe: How to create a semi-transparent frame in Xamarin (XAML code)? Pin
Richard MacCutchan14-May-21 0:57
mveRichard MacCutchan14-May-21 0:57 
AnswerRe: How to create a semi-transparent frame in Xamarin (XAML code)? Pin
Gerry Schmitz14-May-21 9:42
mveGerry Schmitz14-May-21 9:42 
QuestionHow do I fire up an Android Emulator in Android Studio? Pin
priyamtheone6-May-21 8:14
priyamtheone6-May-21 8:14 
QuestionRe: How do I fire up an Android Emulator in Android Studio? Pin
David Crow9-May-21 16:23
David Crow9-May-21 16:23 
AnswerRe: How do I fire up an Android Emulator in Android Studio? Pin
priyamtheone11-May-21 9:12
priyamtheone11-May-21 9:12 
AnswerRe: How do I fire up an Android Emulator in Android Studio? Pin
Gerry Schmitz14-May-21 9:53
mveGerry Schmitz14-May-21 9:53 
GeneralRe: How do I fire up an Android Emulator in Android Studio? Pin
priyamtheone15-May-21 5:55
priyamtheone15-May-21 5:55 
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
priyamtheone27-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
Nima 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
David Crow2-May-21 16:42 
QuestionAndroid studio Pin
Zainab Hussaini14-Apr-21 0:51
Zainab 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
leesungyoen5-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
SeanChupas6-Apr-21 2:14 
QuestionRe: Kotlin Interface Listener inheritance Error Pin
David Crow6-Apr-21 2:22
David Crow6-Apr-21 2:22 
QuestionImplement AsyncTask Pin
paradox029-Mar-21 22:02
paradox029-Mar-21 22:02 
QuestionRe: Implement AsyncTask Pin
David Crow8-Apr-21 4:33
David Crow8-Apr-21 4:33 
AnswerRe: Implement AsyncTask Pin
James_Carter42023-May-21 4:14
James_Carter42023-May-21 4:14 
QuestionAndroid Studio oddity Pin
David Crow3-Mar-21 4:08
David 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
George 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
David Crow3-Mar-21 2:35 

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.