aintshy / android

Android App
Other
7 stars 1 forks source link

init view and word «this» #25

Closed troian88 closed 10 years ago

troian88 commented 10 years ago
 @Override
    public void onPostExecute(final Talk talk) {
       this.home.setContentView(R.layout.talk_main);
        new Swipe(Swipe.Target.class.cast(this.home))
            .attach(this.home, R.id.messages);
        final ListView list = ListView.class.cast(
            this.home.findViewById(R.id.messages)
        );
        list.setAdapter(new VisibleMessages(this.home, talk, this));
        new UpdateMessages(this.home, this.number, 0, Tv.TWENTY).execute();
    }

Example:

ListView listview;
@Override
    public void onPostExecute(final Talk talk) {
      home.setContentView(R.layout.talk_main);
        new Swipe(Swipe.Target.class.cast(home))
            .attach(this.home, R.id.messages);
       listview =(ListView)findViewById(R.id.messages);
        list.setAdapter(new VisibleMessages(home, talk, this));
        new UpdateMessages(home, number, 0, Tv.TWENTY).execute();
    }
yegor256 commented 10 years ago

I didn't get it... please explain a bit more. What is wrong and why? Besides, please use Markdown formatting, it will make your text more readable

troian88 commented 10 years ago

corrected in accordance with the comment

yegor256 commented 10 years ago

Using this. is a good practice