이 여기에서 알 수 있듯이 내가 레이아웃의 중심과 하단에 FrameLayout이의 이미지를 통해 텍스트 뷰를 구현하기 위해 노력하고 있습니다 :오버레이 텍스트 - 안드로이드
http://developer.android.com/resources/articles/layout-tricks-merge.html
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="center"
android:src="@drawable/golden_gate" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dip"
android:layout_gravity="center_horizontal|bottom"
android:padding="12dip"
android:background="#AA000000"
android:textColor="#ffffffff"
android:text="Golden Gate" />
</FrameLayout>
이 프로그래밍 방식으로 구현하는 데 노력하고 있지만 행운을 함께 .. 나는 항상 왼쪽 상단 모서리에있는 textview 얻을. 아무도 도움이? 여기 내 코드입니다 :
FrameLayout frameLay = new FrameLayout(MainScreen.this);
LayoutParams layoutParamsFrame = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
frameLay.setLayoutParams(layoutParamsFrame);
LinearLayout.LayoutParams layoutParamsImage= new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
ImageView imageView= new ImageView(MainScreen.this);
imageView.setImageResource(R.drawable.movie);
imageView.setLayoutParams(layoutParamsImage);
TextView theText=new TextView(MainScreen.this);
theText.setText("GOLDEN Gate");
theText.setTextColor(Color.WHITE);
theText.setTypeface(Typeface.DEFAULT_BOLD);
LayoutParams layoutParamsText= new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
theText.setLayoutParams(layoutParamsText);
theText.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.BOTTOM);
frameLay.addView(theText);
frameLay.addView(imageView);
작동합니다! 대단히 감사합니다! – andreasv
@ 브레멘 감사합니다. 백만 달러 –