Why can't I set text to an Android TextView?

前端 未结 8 2086
孤城傲影
孤城傲影 2020-12-31 03:04

I\'m having a problem with setting text to a TextView:

TextView android:editable = \"true\".

In my .java it seems like that this should wor

8条回答
  •  爱一瞬间的悲伤
    2020-12-31 03:49

    To settext in any of in activity than use this below code... Follow these step one by one:

    1.Declare

        private TextView event_post;
    

    2.Bind this

        event_post = (TextView) findViewById(R.id.text_post);
    

    3.SetText in

        event_post.setText(event_post_count);
    

提交回复
热议问题