개발중인 Android 애플리케이션에 문제가 있습니다.MapActivity의 EditText에 표시되지 않는 텍스트
화면 상단에 EditText
인 Activity
이 있고 나머지 공간을 차지하는지도가 있습니다. 문제는 EditText
에 내가 입력 한 텍스트가 표시되지 않는다는 것입니다. 당신은 EditText
에 초점을 맞추고 더 많은 텍스트를 입력 할 수 있으며 심지어는 앱이 넣은 텍스트를 EditText
에 넣고 복사 할 수 있습니다. 다른 응용 프로그램에 붙여 넣으면 EditText
에 있다고 가정하는 텍스트임을 알 수 있습니다. 그래서 그 텍스트는 거기에 있다는 것을 압니다. 그러나 나는 텍스트가 왜 보이지 않는지 이해하지 못합니다.
EditText
(작동했지만 텍스트는 여전히 보이지 않음)의 배경색을 변경하고 텍스트 색상을 변경 (아무 것도 변경하지 않음) 해 보았습니다. 다음은 내 XML 파일입니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical" >
<EditText
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/findingSatellites"
android:inputType="text"
android:ems="10" />
<com.google.android.maps.MapView
android:id="@+id/bigMap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="someapikey"
android:clickable="true" >
</com.google.android.maps.MapView>
</LinearLayout>
지도가 올바르게 표시되었습니다. 너 나 좀 도와 줄 수있어?
업데이트 : 나는 XML 파일 (코드)에서지도 지금 EditText
내부의 텍스트를 렌더링을 주석 시도
. MapOverlay를 주석 처리하려고했지만 텍스트가 여전히 표시됩니다. 나는 EditText
을 TextView
으로 바꾸려고 시도했지만 같은 결과가 나왔다. Activity
에지도가있을 때 텍스트가 렌더링되지 않습니다.
업데이트 2 :
제안 사항에 따라 xml을 수정했습니다. 이것은 내가 지금 가지고있는 것입니다 :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true" >
<RelativeLayout
android:id="@+id/statusLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<EditText
android:id="@+id/status"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:text="@string/findingSatellites" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/mapLayout"
android:layout_below="@id/statusLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true" >
<com.google.android.maps.MapView
android:id="@+id/bigMap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0ZGxti1I-qNSsMmsOCqnbPsnNG7Sl4U2aHvDc-Q"
android:clickable="true" />
</RelativeLayout>
</RelativeLayout>
여전히 텍스트를 렌더링하지 않습니다.
너비가 wrap_content 인 것 같아. –