This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends ActionBarActivity { | |
private EditText nameText; | |
private EditText pwdText; | |
private Button button; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.evasion.listviewdemo; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.TextView; | |
import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
首先SAXParserFactory来创建一个SAXParserFactory实例 | |
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); | |
然后根据SAXParserFactory实例来创建SAXParser,再从SAXParser中得到一个XMLReader的实例,XMLReader是一个接口 | |
XMLReader xmlReader = saxParserFactory.newSAXParser().getXMLReader(); | |
把自己编写的Handler注册到XMLReader中去,一般最重要的就是ContentHandler | |
xmlReader.setContentHandler(ContentHandler); | |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface monitor{ | |
public void displayText(); | |
public void displayGraphics(); | |
} //定义监视器接口 | |
----------------------------------------------------- | |
class LCD implements monitor{ | |
public void displayText(){ | |
System.out.println("this is the lcd screen"); | |
} | |
OlderNewer