이 같은 레이아웃 뭔가 되세요. (이 표시되지 않습니다 의미 간으로 정의 수평 레이아웃을, 알을
활동에 지금
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"</EditText>
<LinearLayout
android:id="@+id/horizontal_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/horizontal_layout"
android:visibility="gone">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
은 다음과 같이 somethign 있습니다
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test);
EditText edit = (EditText) findViewById(R.id.teste_editText1);
final LinearLayout layout = (LinearLayout)findViewById(R.id.horizontal_layout);
edit.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View paramView, boolean paramBoolean) {
if (paramBoolean) {//if is focused
layout.setVisibility(View.VISIBLE);
} else {
layout.setVisibility(View.GONE);
}
}
});
}
스크린 샷을 추가하는 것이 유용 할 수 있습니다. 또한 우리가 말하는 안드로이드의 버전은 무엇입니까? :) –
편집 텍스트가 초점을 맞추고 다시 초점을 맞추지 않을 때 나타나는 "사라진"보기 (세 개의 버트 노스가있는 수평 선형 레이아웃과 같은)를 보지 않으시겠습니까? –
예, 정확하게 누노가 말한 것. 그게 위젯 유형인가요? – RDinoso