setVisibility ( )源码实例Demo

android.widget.AutoCompleteTextView#setVisibility ( )源码实例Demo

下面列出了android.widget.AutoCompleteTextView#setVisibility ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: zom-android-matrix   文件: AccountActivity.java
private void setupUIPre ()
    {
        ((ImApp)getApplication()).setAppTheme(this);

        setContentView(R.layout.account_activity);

        getSupportActionBar().setHomeButtonEnabled(true);

        mIsNewAccount = getIntent().getBooleanExtra("register", false);

        mEditUserAccount = (EditText) findViewById(R.id.edtName);
        mEditUserAccount.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                checkUserChanged();
            }
        });

        mEditPass = (EditText) findViewById(R.id.edtPass);

        mEditPassConfirm = (EditText) findViewById(R.id.edtPassConfirm);
        mSpinnerDomains = (AutoCompleteTextView) findViewById(R.id.spinnerDomains);

        if (mIsNewAccount)
        {
            mEditPassConfirm.setVisibility(View.VISIBLE);
            mSpinnerDomains.setVisibility(View.VISIBLE);
            mEditUserAccount.setHint(R.string.account_setup_new_username);

            /*
            ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_dropdown_item_1line, getResources().getStringArray(R.array.account_domains));
            mSpinnerDomains.setAdapter(adapter);
            */

        }

        //mRememberPass = (CheckBox) findViewById(R.id.rememberPassword);
        //mUseTor = (CheckBox) findViewById(R.id.useTor);


       // mBtnSignIn = (Button) findViewById(R.id.btnSignIn);

//        if (mIsNewAccount)
  //          mBtnSignIn.setText(R.string.btn_create_new_account);

        mBtnAdvanced = (Button) findViewById(R.id.btnAdvanced);

        /**
        mRememberPass.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                updateWidgetState();
            }
        });*/

    }
 
源代码2 项目: zom-android-matrix   文件: AccountViewFragment.java
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.account_activity, container, false);


        mIsNewAccount = getIntent().getBooleanExtra("register", false);


        mEditUserAccount = (EditText) view.findViewById(R.id.edtName);
        mEditUserAccount.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                checkUserChanged();
            }
        });

        mEditPass = (EditText) view.findViewById(R.id.edtPass);

        mEditPassConfirm = (EditText) view.findViewById(R.id.edtPassConfirm);
        mSpinnerDomains = (AutoCompleteTextView) view.findViewById(R.id.spinnerDomains);

        if (mIsNewAccount)
        {
            mEditPassConfirm.setVisibility(View.VISIBLE);
            mSpinnerDomains.setVisibility(View.VISIBLE);
            mEditUserAccount.setHint(R.string.account_setup_new_username);

            ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
                    android.R.layout.simple_dropdown_item_1line, Server.getServersText(getActivity()));
            mSpinnerDomains.setAdapter(adapter);

        }

//        mRememberPass = (CheckBox) findViewById(R.id.rememberPassword);
  //      mUseTor = (CheckBox) findViewById(R.id.useTor);


        mBtnSignIn = (Button) view.findViewById(R.id.btnSignIn);

        if (mIsNewAccount)
            mBtnSignIn.setText(R.string.btn_create_new_account);


        //mBtnAdvanced = (Button) findViewById(R.id.btnAdvanced);
       // mBtnQrDisplay = (Button) findViewById(R.id.btnQR);

        /*
        mRememberPass.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                updateWidgetState();
            }
        });*/

        return view;

    }
 
源代码3 项目: Zom-Android-XMPP   文件: AccountActivity.java
private void setupUIPre ()
    {
        ((ImApp)getApplication()).setAppTheme(this);

        setContentView(R.layout.account_activity);

        getSupportActionBar().setHomeButtonEnabled(true);

        mIsNewAccount = getIntent().getBooleanExtra("register", false);

        mEditUserAccount = (EditText) findViewById(R.id.edtName);
        mEditUserAccount.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                checkUserChanged();
            }
        });

        mEditPass = (EditText) findViewById(R.id.edtPass);

        mEditPassConfirm = (EditText) findViewById(R.id.edtPassConfirm);
        mSpinnerDomains = (AutoCompleteTextView) findViewById(R.id.spinnerDomains);

        if (mIsNewAccount)
        {
            mEditPassConfirm.setVisibility(View.VISIBLE);
            mSpinnerDomains.setVisibility(View.VISIBLE);
            mEditUserAccount.setHint(R.string.account_setup_new_username);

            /*
            ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_dropdown_item_1line, getResources().getStringArray(R.array.account_domains));
            mSpinnerDomains.setAdapter(adapter);
            */

        }

        //mRememberPass = (CheckBox) findViewById(R.id.rememberPassword);
        //mUseTor = (CheckBox) findViewById(R.id.useTor);


       // mBtnSignIn = (Button) findViewById(R.id.btnSignIn);

//        if (mIsNewAccount)
  //          mBtnSignIn.setText(R.string.btn_create_new_account);

        mBtnAdvanced = (Button) findViewById(R.id.btnAdvanced);

        /**
        mRememberPass.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                updateWidgetState();
            }
        });*/

    }
 
源代码4 项目: Zom-Android-XMPP   文件: AccountViewFragment.java
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.account_activity, container, false);


        mIsNewAccount = getIntent().getBooleanExtra("register", false);


        mEditUserAccount = (EditText) view.findViewById(R.id.edtName);
        mEditUserAccount.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                checkUserChanged();
            }
        });

        mEditPass = (EditText) view.findViewById(R.id.edtPass);

        mEditPassConfirm = (EditText) view.findViewById(R.id.edtPassConfirm);
        mSpinnerDomains = (AutoCompleteTextView) view.findViewById(R.id.spinnerDomains);

        if (mIsNewAccount)
        {
            mEditPassConfirm.setVisibility(View.VISIBLE);
            mSpinnerDomains.setVisibility(View.VISIBLE);
            mEditUserAccount.setHint(R.string.account_setup_new_username);

            ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
                    android.R.layout.simple_dropdown_item_1line, Server.getServersText(getActivity()));
            mSpinnerDomains.setAdapter(adapter);

        }

//        mRememberPass = (CheckBox) findViewById(R.id.rememberPassword);
  //      mUseTor = (CheckBox) findViewById(R.id.useTor);


        mBtnSignIn = (Button) view.findViewById(R.id.btnSignIn);

        if (mIsNewAccount)
            mBtnSignIn.setText(R.string.btn_create_new_account);


        //mBtnAdvanced = (Button) findViewById(R.id.btnAdvanced);
       // mBtnQrDisplay = (Button) findViewById(R.id.btnQR);

        /*
        mRememberPass.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                updateWidgetState();
            }
        });*/

        return view;

    }