commit 4eca8959a9e440348b47619736e5f5ec4b9c1f92 Author: Victor Date: Thu Aug 29 16:02:09 2013 +0300 Создание проекта diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aff15c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.classpath +.cproject +.project +bin/ +gen/ +obj/ +tmp/ +proguard/ \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..36bbc82 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/ic_launcher-web.png b/ic_launcher-web.png new file mode 100644 index 0000000..3591e06 Binary files /dev/null and b/ic_launcher-web.png differ diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar new file mode 100644 index 0000000..cf12d28 Binary files /dev/null and b/libs/android-support-v4.jar differ diff --git a/proguard-project.txt b/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/project.properties b/project.properties new file mode 100644 index 0000000..6d72362 --- /dev/null +++ b/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-18 +android.library.reference.1=../menudrawer diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..c594eb0 Binary files /dev/null and b/res/drawable-hdpi/ic_launcher.png differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..9ed654c Binary files /dev/null and b/res/drawable-mdpi/ic_launcher.png differ diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..e4e04aa Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ diff --git a/res/drawable-xxhdpi/ic_launcher.png b/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..1108fbc Binary files /dev/null and b/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/res/layout/actions.xml b/res/layout/actions.xml new file mode 100644 index 0000000..a39fa0b --- /dev/null +++ b/res/layout/actions.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/res/layout/content.xml b/res/layout/content.xml new file mode 100644 index 0000000..3e9cfcb --- /dev/null +++ b/res/layout/content.xml @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/res/layout/diary_item.xml b/res/layout/diary_item.xml new file mode 100644 index 0000000..8161886 --- /dev/null +++ b/res/layout/diary_item.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/menu/diary.xml b/res/menu/diary.xml new file mode 100644 index 0000000..f3b10b6 --- /dev/null +++ b/res/menu/diary.xml @@ -0,0 +1,6 @@ + + + diff --git a/res/menu/main.xml b/res/menu/main.xml new file mode 100644 index 0000000..f3b10b6 --- /dev/null +++ b/res/menu/main.xml @@ -0,0 +1,6 @@ + + + diff --git a/res/values-v11/styles.xml b/res/values-v11/styles.xml new file mode 100644 index 0000000..541752f --- /dev/null +++ b/res/values-v11/styles.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml new file mode 100644 index 0000000..23dcc1e --- /dev/null +++ b/res/values/strings.xml @@ -0,0 +1,8 @@ + + + + aNNiMON.com + Настройки + Дневники + + diff --git a/res/values/styles.xml b/res/values/styles.xml new file mode 100644 index 0000000..6ce89c7 --- /dev/null +++ b/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/src/com/annimon/client/DiaryActivity.java b/src/com/annimon/client/DiaryActivity.java new file mode 100644 index 0000000..66ecf3e --- /dev/null +++ b/src/com/annimon/client/DiaryActivity.java @@ -0,0 +1,29 @@ +package com.annimon.client; + +import android.app.ListActivity; +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; +import android.view.View; +import android.widget.AdapterView; + +public class DiaryActivity extends ListActivity implements AdapterView.OnItemClickListener { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.diary, menu); + return true; + } + + @Override + public void onItemClick(AdapterView adapterView, View view, int position, long id) { + + } +} diff --git a/src/com/annimon/client/MainActivity.java b/src/com/annimon/client/MainActivity.java new file mode 100644 index 0000000..1a74d70 --- /dev/null +++ b/src/com/annimon/client/MainActivity.java @@ -0,0 +1,55 @@ +package com.annimon.client; + +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.Toast; + +import net.simonvt.menudrawer.MenuDrawer; +import net.simonvt.menudrawer.Position; + +public class MainActivity extends Activity { + + private MenuDrawer mMenuDrawer; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // setContentView(R.layout.activity_main); + + /*Intent intent = new Intent(this, DiaryActivity.class); + startActivity(intent);*/ + + mMenuDrawer = MenuDrawer.attach(this, MenuDrawer.Type.BEHIND, Position.LEFT, MenuDrawer.MENU_DRAG_WINDOW); + mMenuDrawer.setContentView(R.layout.content); + mMenuDrawer.setMenuView(R.layout.actions); + + final ListView viewActionsList = (ListView) findViewById(R.id.actions); + + final String[] menu = new String[] { + "", "", "", " " + }; + viewActionsList.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, menu)); + viewActionsList.setOnItemClickListener(new AdapterView.OnItemClickListener() { + + @Override + public void onItemClick(AdapterView adapter, View v, int position, long flags) { + Toast.makeText(getApplicationContext(), ": " + menu[position], Toast.LENGTH_SHORT).show(); + } + }); + + mMenuDrawer.peekDrawer(); + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + getMenuInflater().inflate(R.menu.main, menu); + return true; + } + +}