|
- require "import"8 w3 y: Z6 S; m
- import "android.app.*"
, k7 k$ K0 A* {) V8 ] - import "android.os.*" Q; ~' |2 ^; L; c" C/ y' ?0 p
- import "android.widget.*"4 B/ h, ] `0 Y
- import "android.view.*". p. m5 L- ~: i3 S* p6 l# W
- import"android.text.*"
# f' ?8 q0 p5 {* u% u - import "android.graphics.drawable.*", r2 @$ y/ h' S
- 5 a6 r* k) {% G, J
- --作者QQ2830376751- v1 T# I8 ~4 U8 X$ E8 m
- activity.setTitle('关于')# s& {9 A! ]; ~% _2 Z$ Z, [
- : ]7 x \1 m8 ]& Y
- local Theme_Color=tointeger(0xFF3F51B5)6 C& g7 [& o0 V. V1 l: F' C3 n9 |
0 K) _9 h x3 }/ H0 E8 r' d% d- activity.setTheme(android.R.style.Theme_DeviceDefault_Light_DarkActionBar)4 ]2 g2 q B/ z4 F; e7 a. U; |
- activity.ActionBar.show()- }" \% f( h7 T% q: y/ V. N+ _3 Q8 X
- activity.ActionBar.setBackgroundDrawable(ColorDrawable(Theme_Color))
' `, _' v1 j1 U& ^9 W0 I - activity.getWindow().setStatusBarColor(0xFF303F9F);
6 `5 B# D- }! h( ^8 F - activity.getActionBar().setDisplayHomeAsUpEnabled(true)
) S# g9 x/ h) w5 h( k# ?" I3 F' Y, O ^
4 U/ L4 h+ j8 b2 s P- h c- function onMenuItemSelected(id,title)) ]8 L* r9 @- \# o
- activity.finish()
/ \8 ~' D5 D: X& B- p, e, h - end
+ Q9 t: W% ~- L5 G, L, l; A
' P+ V" z+ H. o) k
9 ]0 u4 t7 m7 D. w/ m7 F- shamrock=) Y, t5 ]: n' R* H5 ^
- {
" ?- Y" X/ `8 w$ `) W! H - LinearLayout;
1 \6 v1 t4 B! D; m9 G+ Y - Orientation='vertical';" W& K5 }0 t/ A8 W* N
- layout_width='fill';
6 C" q+ {" v2 L* ] - layout_height='fill';
& z* |9 N/ ]/ Y% K0 X4 U# W - {4 d! K( D, `) \8 o; D
- ListView;
3 t% O( \! U& j* u$ s1 S - id="listView";% G1 i9 X5 Y9 h5 [6 ] j
- DividerHeight="0dp";) p4 c# q0 j$ @' ]$ Q: m
- layout_gravity="center";5 s1 j$ h9 Q! [. x+ m z, \
- layout_width="-1";
+ v( O/ [0 J: }2 z6 } - layout_height="-1";
) c3 B% Y$ e. N3 b& e& b7 \ - };
4 G0 i. X, y) P$ e - };& ]( d: M' m; r" v
- activity.setContentView(loadlayout(shamrock))2 K8 W' X2 w# J+ R1 T/ n* z8 r+ k
, c1 |; _$ ` t9 e1 \- % j6 E: x* `& ?2 X' o1 j+ c" G% r
- 7 w( s) U- r7 `) ^
- data = {}8 _* \! b/ R( {7 P) Y
, T0 L- m- n$ n* W6 d- ?- setting=6 ]! x5 v$ u" e, B; S. Q. b
- {1 ~$ x" n- W' V4 H' s2 c; \
- {--1, j; s& z# m9 \
- LinearLayout;
6 c9 b, u( S& I9 \' | - gravity="center";/ H+ x h+ U3 I8 R- k
- layout_width="fill";5 o4 x7 y: m, `' [# g
- layout_height="75dp";- f6 ]* ^# H3 U) E* B$ a3 [/ ^. l
- {
0 z. H1 R9 [3 `1 Y - LinearLayout;+ Y' h! d7 S6 W3 f6 ?, L/ N
- orientation="vertical";
5 d) C/ [& n! d. v - layout_height="fill";
& X. L# s. d4 C% Q - gravity="center_vertical";
6 V2 ?1 p3 _4 z/ T# \1 R, T7 ]- X5 H - layout_weight="1";4 [6 S: d6 M/ C: B. m
- {; V8 v; ? h1 Z. P9 O# f0 C
- TextView;% _0 c; p- e' j# n
- layout_marginLeft="15dp";1 z! u5 Q, h$ ^8 S
- textSize="16sp";
4 H0 L" W9 r8 X9 j' K) V - textColor=0xff000000;
, s, p+ s7 V; m( `5 m - id="subtitle";
5 d4 i' f e) A - };
: x: M2 G; }# T" @! U - {
$ n5 ?" q2 ~+ `" a ` - TextView;3 V" A8 T2 g2 s: d
- id="message";
1 I2 A+ f' d( l& h - textSize="15sp";
% L' X; h% p" e6 Q2 g) j. l! h0 e - layout_marginLeft="15dp";$ A8 o9 x6 C- W; O8 R0 w
- };
! I( F+ R( d! S( [5 j- \ - };1 R6 ^2 o- j, r O
- };- J- F+ V$ Y5 R; b: a
- {--2
S1 ?& n" \ U' @% N0 K - LinearLayout;
, Q: z) \" F7 z2 E" F& P. C - layout_height="1dp";
+ z: M7 q6 Q) N( z9 [- j9 h - backgroundColor=0xFFE0E0E0;. o; d9 G) a7 g1 y ]' v
- layout_width="fill";* |# y- y: f/ r- X* z, u7 {
- };- h( f1 w, `+ F) J' W# C$ G7 f
- {--38 f! \* q9 o+ W, s9 R
- LinearLayout;0 j( k5 K7 h+ ^, l, R: F. s
- gravity="center";
, Y& M4 T4 X. t4 X1 A* i - layout_width="fill";' B$ R9 K7 @. s! B* V" B* s) x- ]
- layout_height="55dp";5 F E# z" c% j
- {, e* @# x* W# r3 b1 h* I
- LinearLayout;: ~; ~+ r' _/ w/ h2 R9 `" ^4 P
- orientation="vertical";* N& y4 n2 K8 m. @/ Y
- layout_height="fill";) U6 C: @* L3 k- \" Q X
- gravity="center_vertical";
, \& f7 N' @1 c" z - layout_weight="1";
* Q+ l- x& G" [/ _( |* |9 }1 i* K - {
$ _- H) G' d' A - TextView;) b. N/ l) t8 y' g& Q4 R
- layout_marginLeft="15dp";
& z; l" N: T% |+ @7 x0 @. z' ~ - textSize="16sp";5 k. {6 y: Q9 V1 s. {
- textColor=0xff000000;1 k1 Q. {! Q/ ~8 u
- id="subtitle";0 r4 X0 k8 O+ B5 r3 b# C* l7 G. a
- };1 Z, r! x* ^1 x% S* |# V/ A
- };
0 A8 F* E/ ?! I* g$ z - };( H# s% Y3 U1 h) l% R9 W
- };! i/ g% q7 i7 ~9 H/ r# O
- adp=LuaMultiAdapter(this,data,setting)
$ I4 C* G" c3 Z3 V& a: f9 B+ P# P
+ A n- _& I- q& w1 p! o+ @
+ r$ T: d/ ` R9 }- n' B- adp.add{__type=1,subtitle="App v1.0.1",message="Copyright © 2021 Android Does"}) h. M" x* @: o; F% J
- adp.add{__type=2}, R9 |; n @) C, F) Y( g X. S$ e
- adp.add{__type=1,subtitle="帮助",message="常见问题解答"}
9 Z2 B& u# P& \( w& Y - adp.add{__type=2}; k; W9 U- `; i* l1 ?
- adp.add{__type=3,subtitle="表达感谢"}
# l* a- W, N, |2 Y! n& R1 `" {. | - adp.add{__type=2}* Q6 i+ P( f# w) L
- listView.setAdapter(adp)
; |4 q7 z: H9 E2 l+ j
0 d& K1 D+ X5 L5 c6 {- 5 i8 @" n1 Q$ q6 z3 u2 L3 Q
- listView.setOnItemClickListener(AdapterView.OnItemClickListener{
4 b* X. j8 x9 ?5 {1 G7 } - onItemClick=function(id,v,zero,one)
( X% ^* P% b6 }5 Q) Y1 m* T - if v.Tag.subtitle.Text==nil
: x. C* c" V* P4 c - else/ d9 M3 f; y) f" [( ]
- if v.Tag.subtitle.Text=="帮助", u1 _& C# `# r. j# |! W5 A* s
- print( v.Tag.subtitle.Text)! _) ^: d: x2 \0 h
- elseif v.Tag.subtitle.Text=="表达感谢"0 T# y/ U, j4 ]5 C5 C* [
- print( v.Tag.subtitle.Text)" S9 t5 x- }, a+ t( K2 }0 E
- end% H4 `/ B5 T a
- end
& d y3 d2 z1 E - end, Z) j7 M0 w: I+ N, v3 L& V
- })
复制代码 |
|