有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何解决listView Onclick项编译时代码过大的错误

请注意,我有一个令人不安的问题,关于listView java代码,该代码在编译时不断失败,错误消息是代码太大

我的代码低于800个。如果我将代码减少到600,编译就不会失败。请告诉我该怎么办。我有835张歌词列表, 下面是我的代码

                    //start NewActivity with title for actionbar and text for textview
                    Intent intent = new Intent(mContext, LyricsActivity.class);
                    intent.putExtra("actionBarTitle", "New songs 001");
                    intent.putExtra("contentTv", "The lyrics in full details");
                    mContext.startActivity(intent);


                }
                if (modellist.get(i).getTitle().equals("Song 002 | New ways of living")) {
                    //start NewActivity with title for actionbar and text for textview
                    Intent intent = new Intent(mContext, LyricsActivity.class);
                    intent.putExtra("actionBarTitle", "New songs 001");
                    intent.putExtra("contentTv", "he lyrics in full details");
                    mContext.startActivity(intent);
.
.
.
.
.
.
.
.
etc.. to 835 example codes of these examples above causes the error

请帮助我做些什么,以便完成我的歌曲。谢谢


共 (0) 个答案