-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathBasic.java
More file actions
102 lines (81 loc) · 2.64 KB
/
Basic.java
File metadata and controls
102 lines (81 loc) · 2.64 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package com.vivek.github;
import com.vivek.github.basic.Branch;
import com.vivek.github.basic.Check;
import com.vivek.github.basic.Commit;
import com.vivek.github.basic.Git;
import com.vivek.github.basic.Install;
import com.vivek.github.basic.Move;
import com.vivek.github.basic.Remote;
import com.vivek.github.basic.Remove;
import com.vivek.github.basic.Repo;
import com.vivek.github.basic.SetUp;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Basic extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
ListView l = getListView();
String[] b = {"Introduction to Github" , "How to install git", "How to set up git" , " Learn about Repository" , "Learn about commits" , "Learn About Branch" , "Learn about remotes" , " Move or rename a file" , "Remove files from the working tree and from the index" , "Learn about checkout"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this , android.R.layout.simple_list_item_1 , b);
l.setAdapter(adapter);
l.setOnItemClickListener(new OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
switch(position){
case 0:
Intent b = new Intent(Basic.this , Git.class);
startActivity(b);
break;
case 1:
Intent w = new Intent(Basic.this , Install.class);
startActivity(w);
break;
case 2:
Intent s = new Intent(Basic.this , SetUp.class);
startActivity(s);
break;
case 3:
Intent r = new Intent(Basic.this , Repo.class);
startActivity(r);
break;
case 4:
Intent c = new Intent(Basic.this , Commit.class);
startActivity(c);
break;
case 5:
Intent br = new Intent(Basic.this , Branch.class);
startActivity(br);
break;
case 6:
Intent re = new Intent(Basic.this , Remote.class);
startActivity(re);
break;
case 7:
Intent mo = new Intent(Basic.this , Move.class);
startActivity(mo);
break;
case 8:
Intent rem = new Intent(Basic.this , Remove.class);
startActivity(rem);
break;
case 9:
Intent ch = new Intent(Basic.this , Check.class);
startActivity(ch);
break;
default:
break;
}
}
});
}
}