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

학교에서 앱개발 과제를하는데 너무어려워서 질문합니다.ㅎㅎ

–3 추천

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.ggiriggiri.MainActivity" >

    <ImageView
            android:contentDescription="@string/contentDescription"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src=@drawable/father" /> 

 Multiple annotations found at this line:
 - Open quote is expected for attribute "android:src" associated with an element type
  "ImageView". 이렇게 에러가 뜹니다..ㅠㅠ

       

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/title01" />
   
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/family01" />
      
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src=@drawable/mother"/>
           
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/title02" />
   
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/family02" />
      
       
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src=@drawable/brother"/>
           
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/title03" />
   
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/family03" />
      
       
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src=@drawable/me"/>
     
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/title04" />
   
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/family024" />
  
         <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />
</RelativeLayout>

 

그리고 사진을 클릭하면 전화를 걸수 있도록 추가하고싶은데 어떤 소스를 추가하면될까요..?

byskip (90 포인트) 님이 2014년 12월 3일 질문

5개의 답변

+2 추천
 
android:src="@drawable/father" />    <--  " 빠짐..
 
너무 어려운 코드라서...한참봤네요
" 을 못찾으시는데.. 이미지 클릭 이벤트하고 전화 거는것을 하실수있으실지요...
 
단지 " 만 못찾으시고 나머지는 하실수 있다는 전제로 아래 코드를 참고하세요
 
 
> 이미지 클릭
 
imgView.setOnClickListener(new View.OnClickListener() {
   //@Override
   public void onClick(View v) {
      Log.v(TAG, " click");         
   }        
});
 
 
> 전화걸기
 
 <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>  
 
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:123456789")));;
 
 
 
 
doridori2013@nate.com (네이트온가능)
익명사용자 님이 2014년 12월 3일 답변
2014년 12월 3일 수정
+2 추천
" 쿼터가 빠져다고 친절하게 나와있네요
건방진프로그래머 (26,630 포인트) 님이 2014년 12월 3일 답변
0 추천
거의 대부분의 오류코드는 어디가 어떻게 틀렸으니 어떻게 수정하라고 친절하게 가르쳐준답니다...
익명사용자 (5,930 포인트) 님이 2014년 12월 5일 답변
0 추천
너무 어려운 코드라서...한참봤네요
" 을 못찾으시는데.. 이미지 클릭 이벤트하고 전화 거는것을 하실수있으실지요...
 
이거 답변보고 빵 터졌네요 ㅎㅎ
익명사용자 님이 2014년 12월 12일 답변
0 추천

Open quote is expected for attribute "android:src" associated with an element type

에러 메시지가 답을 보여주네요.

달기살 (12,990 포인트) 님이 2014년 12월 12일 답변
...