Hello the great community. I am new to Android and trying to build a calculator and this is the first time I am having this problem, not sure what is wrong. I have added buttons
and they look fine on emulator except image button
. The code is below, I was hoping to get help.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp"
android:weightSum="4">
<Button
android:id="@+id/button16"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_weight="1"
android:background="#00000000"
android:text="7"
android:textColor="@android:color/background_dark"
android:textSize="30sp"/>
<Button
android:id="@+id/button5"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_weight="1"
android:background="#00000000"
android:text="8"
android:textColor="@android:color/background_dark"
android:textSize="30sp"/>
<Button
android:id="@+id/button4"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_weight="1"
android:background="#00000000"
android:text="9"
android:textColor="@android:color/background_dark"
android:textSize="30sp"/>
<ImageButton
android:id="@+id/imageButton"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_weight="1"
android:background="#00000000"
android:textColor="@android:color/background_dark"
app:srcCompat="@drawable/divide"/>
</LinearLayout>
The last button divide is not visible and I have added four such linear layouts with 1, 2, 3, minus, 4, 5, 6, multiply buttons, all these multiply, divide, plus and minus buttons
aren't visible unfortunately.
I am just starting out and was hoping to know where am I wrong and what is that I need to fix.
UPDATE
See the above image I have attached. In this visible Views
in the emulator are Buttons
if I change them to ImageButton
the views
like the equal sign. I have change my png's
file but I can't get what I am doing wrong
Thank you