Java Code Examples for android.widget.TextView.setKeyListener()

The following are Jave code examples for showing how to use setKeyListener() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GitHub   File: NumberAddSubView.java   View Source Code Vote up 4 votes
private void initView(){



        View view = mInflater.inflate(R.layout.widet_num_add_sub,this,true);

        mEtxtNum = (TextView) view.findViewById(R.id.etxt_num);
        mEtxtNum.setInputType(InputType.TYPE_NULL);
        mEtxtNum.setKeyListener(null);



        mBtnAdd = (Button) view.findViewById(R.id.btn_add);
        mBtnSub = (Button) view.findViewById(R.id.btn_sub);

        mBtnAdd.setOnClickListener(this);
        mBtnSub.setOnClickListener(this);



    }
 
Example 2
Project: cniao5   File: NumberAddSubView.java   View Source Code Vote up 4 votes
private void initView() {


        View view = mInflater.inflate(R.layout.widet_num_add_sub, this, true);

        mEtxtNum = (TextView) view.findViewById(R.id.etxt_num);
        mEtxtNum.setInputType(InputType.TYPE_NULL);
        mEtxtNum.setKeyListener(null);


        mBtnAdd = (Button) view.findViewById(R.id.btn_add);
        mBtnSub = (Button) view.findViewById(R.id.btn_sub);

        mBtnAdd.setOnClickListener(this);
        mBtnSub.setOnClickListener(this);

    }
 
Example 3
Project: GoMeet   File: MapsMarkerActivity.java   View Source Code Vote up 4 votes
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Retrieve the content view that renders the map.
        setContentView(R.layout.activity_maps);
        // Add title
        getSupportActionBar().setTitle("Event Details");
        // Add Back button
        android.support.v7.app.ActionBar actionBar = getSupportActionBar();
        if(actionBar != null){
            actionBar.setHomeButtonEnabled(true);
            actionBar.setDisplayHomeAsUpEnabled(true);
        }
        // Get intent
        Intent intename = getIntent();
//        nameString = (String) intename.getSerializableExtra("NAME");
//        timeString = (String) intename.getSerializableExtra("TIME");
        nameString = "lalala";
        timeString = "24:00";
        descriptionString = (String) intename.getSerializableExtra("PostText");
        lat = (double) intename.getSerializableExtra("LAT");
        lng = (double) intename.getSerializableExtra("LNG");
//        zipcodeString = (String) intename.getSerializableExtra("ZIPCODE");
//        addressString = (String) intename.getSerializableExtra("ADDRESS");
        zipcodeString = "02215";
        addressString = "PHO";
        location = new LatLng(lat, lng);
        // Get the SupportMapFragment and request notification
        // when the map is ready to be used.
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);
        // Get TextView
        name = (TextView) findViewById(R.id.Name);
        time = (TextView) findViewById(R.id.Time);
        description = (TextView) findViewById(R.id.Description);
        // Get Button
        mapAppCtrl = (Button) findViewById(R.id.openMap);
        mapAppCtrl.setOnClickListener(new MapsMarkerActivity.ButtonClickHandler());
        // Set TextView uneditable
        name.setKeyListener(null);
        time.setKeyListener(null);
        description.setKeyListener(null);
        // Set TextView size and bold
        name.setTextSize(20);
        time.setTextSize(10);
        TextPaint paint = name.getPaint();
        paint.setFakeBoldText(true);
        //Set content
        name.setText(nameString);
        time.setText(timeString);
        description.setText(String.format("%s\n%s\n%s", descriptionString, addressString, zipcodeString));
    }