English 中文(简体)
Android 编程和使用超文本平流机从Wikia.com页中提取类别数据,供列入清单
原标题:Android programming and using HTML parsers to pull category data from a Wikia.com page for use in a ListView

首先,我很想知道,是否甚至有配备安乐器设计书的超文本帽子,或者是否所有我都可以进入安伯斯网站所列的html指挥系统。 原因是,我正在作出一项让你能够进入Zelda Wikia的信号,而不是硬拷贝,如我想要接手的视频游戏标题,并利用媒体Wiki AP来拉名字。

这份以超文本格式写成的所有标题,以及我能够想从使用超文本字塔的回报中提取我所需要的唯一方式,但我不敢肯定的是,有的是,有的是以安的方案拟订工作,如果是这样,我甚至会如何从中提取我所需要的东西。 在我从这份清单中获取数据之后,我想在一份清单中显示这一数据,当标题被点击时,它将把用户带至Wikia,在一份网上电文中注明这一具体名称。 我是否应该这样做,或者是否有任何其他建议,我确实需要帮助。 该法律的其余部分仅涉及任何人想要看到我有的东西:

    package com.lvlup.kikurself.zeldatest;

    import android.app.ListActivity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.AdapterView;
    import android.widget.ArrayAdapter;
    import android.widget.ListView;
    import android.widget.AdapterView.OnItemClickListener;

    public class zeldaGames extends ListActivity {
        public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        String[] values = new String[] { "The Legend of Zelda", "Zelda II: The
         Adventure of Link", "The Legend of Zelda: Ocarina of Time",};
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
        android.R.layout.simple_list_item_1, values);
        setListAdapter(adapter);
        final ListView zeldaList = getListView();

        zeldaList.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View v, int position, long thisID)
      {
         Object o = (zeldaList.getItemAtPosition(position));
         String gameName_temp = (o.toString());

         Intent newIntent = new Intent(v.getContext(), gameDisp.class);
         newIntent.putExtra("tempG", gameName_temp);
         startActivity(newIntent);

    }
    });

感谢你花时间阅读。

最佳回答
问题回答

I wouldn t use a parser on the phone. Before you know, the owner of the page could come up with a new layout, ruining your app.

相反,我将建造一个网络服务(P with DomXML是一种宽松的选择),将特定网站与XML、JSON或其他格式的返回档案相连接。 然后,我将写一份信,将堂顶网服务作为数据来源。

In this way, you will have a lot more computer power. You only have to maintain one instance of the parser, an you know it works on any device, that has downloaded your app.

Maybe sounds like a lot of work, but trust me on this - you ll be better of. Personal and profesional experience





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签