0
첫 번째 게시물은 여기에 있으므로 실수로 사전에 사과하십시오.LayoutInflater를 사용하면 오버레이가 투명하게됩니다.
카메라 미리보기의 오버레이로 일부 단추를 추가하려고하는데 불투명하게하려고해도 단추가 투명 해지면 모든 것이 예상대로 작동합니다.
이것은 내가 레이아웃 팽창하는 방법입니다
LayoutInflater inflater = getLayoutInflater();
View controls = inflater.inflate(R.layout.test, null);
LayoutParams layoutParamsControl = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
this.addContentView(controls, layoutParamsControl);
을 그리고 컨트롤에 대한 XML 파일처럼 보이는 방법이 있습니다 :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button_capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:text="Capture" />
<Button
android:id="@+id/button_mapview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:text="Map" />
</FrameLayout>
</LinearLayout>
내 질문에 누군가가 내 버튼을 투명하게 이유를 알고 않습니다이다 그것을 고치는 방법?
색상을 backgroung으로 추가하려고합니다. android : background = "# ffffff" –
감사합니다! 답변으로 댓글을 수락 할 수 있는지 잘 모르겠습니다. – Stjernstedt