Skip to content Skip to sidebar Skip to footer

Creating Custom Button Class In Android

I'm trying to create custom button class for my android app public class TicTacButton extends Button I've set all the constructors inside the TicTacButton and created custom met

Solution 1:

Using the full package name in the XML file fixed it.

<com.example.tictactoetitan.TicTacButton
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/button1"
        android:layout_toRightOf="@+id/button1" />

Post a Comment for "Creating Custom Button Class In Android"