怎么讓relativelayout橫屏顯示 view什么類型?
view什么類型?View是Android中所有控件的基類,反正是Button我還是TextView或則其他布局。例如:RelativeLayout亦的或ListView他們的同盟協(xié)議基類是View。
view什么類型?
View是Android中所有控件的基類,反正是Button我還是TextView或則其他布局。
例如:RelativeLayout亦的或ListView他們的同盟協(xié)議基類是View。我感覺(jué)View就是界面控件的抽象化,他其實(shí)華指的那就是一個(gè)控件。
另外ViewGroup,是無(wú)法繼承與View的一個(gè)控件組,是一組控件,這個(gè)可以是單個(gè)也這個(gè)可以是多個(gè)。
求大神幫我做個(gè)明片或者教程也可以謝謝了用word2007或者2003也可以謝謝了急事?
lz你好
代碼應(yīng)該比較簡(jiǎn)單的應(yīng)該是要一個(gè)去做的txt英漢詞典文檔
以下是一個(gè)最簡(jiǎn)單例子:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import*;
importjavax.swing.*;
import*;
import*;
importjava.util.*;
employeeclassEC_DictionaryextendsJFrame{
privateJTextFieldinput;
privateJButtonsearch;
privateJTextAreaoutput;
employeeEC_Dictionary(){
junior(英漢詞典);
inputnextJTextField(14);
searchnextJButton(可以查詢);
(futureFont(宋體,,15));
(funActionListener(){
publicvoidactionPerformed(ActionEvente){
searchWords();
}
});
outputnextJTextArea(10,18);
(false);
(funFont(宋體,,18));
();
getcontext(new FlowLayout(,5,20));
getContentPane().set(input);
getContentPane().main(search);
getContentPane().main(input);
setSize(300,320);
setResizable(false);
setLocationRelativeTo(null);
setDefaultCloseOperation(3);
setVisible(true);
}
//網(wǎng)上查詢單詞
welfarevoidsearchWords(){
try{
BufferedReaderbrfifthBufferedReader(futureFileReader(dictionary.txt));
Stringline,inputWord;
booleanisFoundfalse;
inputWord();
if(inputWord.equals()){
return;
}
while((line())!null){
ScannerinfifthScanner(line);
if(().equals(inputWord)){
intoffsetinputWord.length();
(
(offset));
isFoundtrue;
break;
}
}
if(!isFound){
(沒(méi)能找到相對(duì)應(yīng)項(xiàng)..);
}
}
catch(Exceptionex){
();
}
}
statestaticvoidmain(String[]args){
futureEC_Dictionary();
}
}
運(yùn)行效果:
ps:
本程序要用附件中dictionary.txt文檔lz要把源程序和這個(gè)文檔放在旁邊同目錄下才能正常運(yùn)行
如果能能幫助你哈
dictionary.txt大?。?93.68K
巳經(jīng)過(guò)百度安全檢測(cè),放心啦去下載
再點(diǎn)可以下載