-
Notifications
You must be signed in to change notification settings - Fork 1
/
Hack3Activity.java
44 lines (33 loc) · 1.07 KB
/
Hack3Activity.java
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
package com.diygreen.androidhackslayout;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;
import com.diygreen.androidhackslayout.adapter.Hack3LVAdapter;
import com.diygreen.androidhackslayout.service.ViewServer;
public class Hack3Activity extends AppCompatActivity {
private ListView mContentLV;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hack3);
ViewServer.get(this).addWindow(this);
initView();
// initData();
}
private void initView() {
this.mContentLV = (ListView) findViewById(R.id.lv_content);
}
private void initData() {
this.mContentLV.setAdapter(new Hack3LVAdapter(this));
}
@Override
protected void onResume() {
super.onResume();
ViewServer.get(this).setFocusedWindow(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
ViewServer.get(this).removeWindow(this);
}
}