English 中文(简体)
甲状腺素和甲状腺素从方言中去除一种观点吗?
原标题:android remove a view from a dialog?

我将如何从这一方言中删除观点? 我知道,我可以从LinearLayout.removeView(id)( LinearLayout.removeView(View))中删除一个观点,这样,如果有人能够告诉我如何获得(LinearLayout)R.layout.database_production_form,那也是 n。 我正在使用AnthonySDK V7

Java:

@Override
protected DialogInterface onCreateDialog(int id){
    LayoutInflater factory = LayoutInflater.from(getBaseContext());
    final View textEntryView = factory.inflate(R.layout.database_creation_form, null);
    setDialogViewAttributes(textEntryView);
    final EditText editText = (EditText)textEntryView.findViewById(R.id.create_form_db_name_et2);
    final Spinner spinner = (Spinner)textEntryView.findViewById(R.id.create_form_type_sp);
    return new AlertDialog.Builder(FileBase.this)
        .setTitle(R.string.create_database_string)
        .setView(textEntryView)
        .show();
}

XML for database_production_form:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" android:paddingTop="25px">


<TextView
    android:id="@+id/create_form_db_name_tv"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="@string/create_form_db_name"
    android:textAppearance="?android:attr/textAppearanceLarge" android:paddingBottom="25px"/>

<EditText
    android:id="@+id/create_form_db_name_et2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:inputType="text">

    <requestFocus />
</EditText>


<TextView
    android:id="@+id/create_form_type_tv"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/create_form_type"
    android:textAppearance="?android:attr/textAppearanceLarge"        android:gravity="center"/>

<Spinner
    android:id="@+id/create_form_type_sp"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

</LinearLayout>
最佳回答

引证:

  final LinearLayout textEntryView = (LinearLayout) factory.inflate(R.layout.database_creation_form, null);
问题回答

我假设,数据库“制作-格式”包含一些线性支出,让步自封=线性支出。 随后,以下法典将允许你查阅。

LinearLayout mainLinear = (LinearLayout)textEntryView.findViewById(R.id.linearLayout);




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签