Skip to content

Commit ec194e3

Browse files
committed
[init repo] first commit
0 parents  commit ec194e3

File tree

148 files changed

+1908
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+1908
-0
lines changed

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.DS_Store
2+
*.swp
3+
build
4+
# built application files
5+
*.apk
6+
*.ap_
7+
8+
# files for the dex VM
9+
*.dex
10+
11+
# Java class files
12+
*.class
13+
14+
# generated files
15+
bin/
16+
gen/
17+
18+
# Local configuration file (sdk path, etc)
19+
local.properties
20+
21+
# Eclipse project files
22+
.classpath
23+
.project
24+
25+
# Android Studio
26+
.idea/
27+
.gradle
28+
/*/local.properties
29+
/*/out
30+
/*/*/build
31+
/*/*/production
32+
*.iml
33+
*.iws
34+
*.ipr
35+
*~
36+
*.swp

SGit/build.gradle

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:0.5.+'
7+
}
8+
}
9+
apply plugin: 'android'
10+
11+
repositories {
12+
mavenCentral()
13+
}
14+
15+
dependencies {
16+
compile 'com.android.support:support-v4:13.0.+'
17+
compile 'org.eclipse.jgit:org.eclipse.jgit:3.0.0.201306101825-r'
18+
compile 'com.nostra13.universalimageloader:universal-image-loader:1.8.6'
19+
}
20+
21+
android {
22+
compileSdkVersion 17
23+
buildToolsVersion "17.0.0"
24+
25+
defaultConfig {
26+
minSdkVersion 14
27+
targetSdkVersion 16
28+
}
29+
}

SGit/libs/android-support-v4.jar

473 KB
Binary file not shown.

SGit/src/main/AndroidManifest.xml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="me.sheimi.sgit"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<uses-sdk
8+
android:minSdkVersion="14"
9+
android:targetSdkVersion="16"/>
10+
11+
<uses-permission android:name="android.permission.INTERNET"/>
12+
<uses-permission android:name="android.permission.CAMERA"/>
13+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
14+
<uses-permission android:name="android.permission.VIBRATE"/>
15+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
16+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
17+
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
18+
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"/>
19+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
20+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
21+
22+
<application
23+
android:allowBackup="true"
24+
android:icon="@drawable/ic_launcher"
25+
android:label="@string/app_name"
26+
android:theme="@style/AppTheme">
27+
<activity
28+
android:name=".RepoListActivity"
29+
android:label="@string/app_name">
30+
<intent-filter>
31+
<action android:name="android.intent.action.MAIN"/>
32+
33+
<category android:name="android.intent.category.LAUNCHER"/>
34+
</intent-filter>
35+
</activity>
36+
<activity
37+
android:name=".activities.SettingsActivity"
38+
android:label="@string/title_activity_settings"
39+
android:parentActivityName=".RepoListActivity">
40+
<meta-data
41+
android:name="android.support.PARENT_ACTIVITY"
42+
android:value="me.sheimi.diary.MainActivity"/>
43+
</activity>
44+
</application>
45+
46+
</manifest>

SGit/src/main/ic_launcher-web.png

16.1 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package me.sheimi.sgit;
2+
3+
import android.app.Activity;
4+
import android.content.Intent;
5+
import android.os.Bundle;
6+
import android.view.Menu;
7+
import android.view.MenuItem;
8+
import android.widget.ListView;
9+
10+
import me.sheimi.sgit.activities.SettingsActivity;
11+
import me.sheimi.sgit.adapters.RepoListAdapter;
12+
import me.sheimi.sgit.dialogs.CloneDialog;
13+
14+
public class RepoListActivity extends Activity {
15+
16+
private ListView mRepoList;
17+
private RepoListAdapter mRepoListAdapter;
18+
19+
@Override
20+
protected void onCreate(Bundle savedInstanceState) {
21+
super.onCreate(savedInstanceState);
22+
setContentView(R.layout.activity_main);
23+
mRepoList = (ListView) findViewById(R.id.repoList);
24+
mRepoListAdapter = new RepoListAdapter(this);
25+
mRepoList.setAdapter(mRepoListAdapter);
26+
mRepoListAdapter.queryAllDiary();
27+
}
28+
29+
@Override
30+
public boolean onCreateOptionsMenu(Menu menu) {
31+
// Inflate the menu; this adds items to the action bar if it is present.
32+
getMenuInflater().inflate(R.menu.main, menu);
33+
return true;
34+
}
35+
36+
@Override
37+
public boolean onOptionsItemSelected(MenuItem item) {
38+
Intent intent;
39+
switch (item.getItemId()) {
40+
case R.id.action_settings:
41+
intent = new Intent(this,
42+
SettingsActivity.class);
43+
startActivity(intent);
44+
overridePendingTransition(R.anim.slide_in_left,
45+
R.anim.slide_out_left);
46+
return true;
47+
case R.id.action_new:
48+
CloneDialog cloneDialog = new CloneDialog();
49+
cloneDialog.show(getFragmentManager(), "clone-dialog");
50+
return true;
51+
52+
}
53+
return super.onOptionsItemSelected(item);
54+
}
55+
56+
}

0 commit comments

Comments
 (0)