마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

버튼 클릭이 되지 않습니다.

0 추천
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBackground">

    <Button
        android:id="@+id/CALL"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="60dp"
        android:background="@color/colorBackground"
        android:text="@string/FPB1"
        android:textColor="@color/colorText"
        android:textSize="60dp" />

    <Button
        android:id="@+id/PHONEBOOK"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/FPB2"
        android:background="@color/colorBackground"
        android:textColor="@color/colorText"
        android:textSize="60dp"
        android:layout_marginTop="50dp" />

    <Button
        android:id="@+id/MESSAGE"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/FPB3"
        android:background="@color/colorBackground"
        android:textColor="@color/colorText"
        android:textSize="60dp"
        android:layout_marginTop="50dp" />

    <Button
        android:id="@+id/APPS"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/FPB4"
        android:background="@color/colorBackground"
        android:textColor="@color/colorText"
        android:textSize="60dp"
        android:layout_marginTop="50dp" />


</LinearLayout>

 

페이지에 일렬로 버튼 4개를 배치했는데 아무것도 클릭이 되지 않습니다.

메인 엑티비티에 각 버튼마다 로그를 찍히게 넣어줬는데 콘솔창에는 아무것도 안찍히네요.

 

 

 

BloBlo (120 포인트) 님이 2017년 5월 13일 질문

1개의 답변

0 추천
자바소스부분에서 버튼을 불러오시고, 클릭리스너를 등록하시면됩니다.
헬프미 (5,430 포인트) 님이 2017년 5월 14일 답변
...