diff --git a/README.md b/README.md index 91e19290..b83a2c50 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,6 @@ http://jingyan.baidu.com/article/ff42efa93177c0c19e2202c3.html ![在Android SDK Manager中配置教育网下载代理](https://raw.githubusercontent.com/hzuapps/android-labs/master/screens/sdk-manager-proxy-edu.cn.png "配置教育网下载代理") ![在Android SDK Manager中选择6.0库](https://raw.githubusercontent.com/hzuapps/android-labs/master/screens/android-6-sdk.png "配置教育网下载代理") ![在Android SDK Manager中下载6.0库](https://raw.githubusercontent.com/hzuapps/android-labs/master/screens/android-6-sdk-download.png "配置教育网下载代理") + +## Android应用架构 +https://github.com/googlesamples/android-architecture diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901103/MainActivity.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901103/MainActivity.java new file mode 100644 index 00000000..27417573 --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901103/MainActivity.java @@ -0,0 +1,52 @@ +package edu.hzuapps.androidworks.homeworks.com1314080901103; + +import android.os.Bundle; +import android.support.design.widget.FloatingActionButton; +import android.support.design.widget.Snackbar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.View; +import android.view.Menu; +import android.view.MenuItem; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + .setAction("Action", null).show(); + } + }); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} diff --git "a/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901103/\345\244\251\346\260\224\351\242\204\346\212\245.txt" "b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901103/\345\244\251\346\260\224\351\242\204\346\212\245.txt" new file mode 100644 index 00000000..e69de29b diff --git "a/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901208/#10\345\257\206\347\240\201\347\233\222APP.txt" "b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901208/#10\345\257\206\347\240\201\347\233\222APP.txt" new file mode 100644 index 00000000..e69de29b diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901211/MainActivity.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901211/MainActivity.java new file mode 100644 index 00000000..f201412d --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901211/MainActivity.java @@ -0,0 +1,37 @@ +package com.homeworks.androidworks.hzuapps.edu.desktopmemo; + +import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; +import android.view.Menu; +import android.view.MenuItem; + +public class MainActivity extends ActionBarActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} diff --git a/demo_pr.txt b/demo_pr.txt new file mode 100644 index 00000000..7ebbd8bc --- /dev/null +++ b/demo_pr.txt @@ -0,0 +1 @@ +测试Pull Request diff --git "a/edu.hzuapps.androidworks.homeworks.com1314080901225/#43\344\273\277\344\275\240\347\224\273\346\210\221\347\214\234\347\224\273\346\235\277\345\212\237\350\203\275.txt" "b/edu.hzuapps.androidworks.homeworks.com1314080901225/#43\344\273\277\344\275\240\347\224\273\346\210\221\347\214\234\347\224\273\346\235\277\345\212\237\350\203\275.txt" new file mode 100644 index 00000000..89cfb5c7 --- /dev/null +++ "b/edu.hzuapps.androidworks.homeworks.com1314080901225/#43\344\273\277\344\275\240\347\224\273\346\210\221\347\214\234\347\224\273\346\235\277\345\212\237\350\203\275.txt" @@ -0,0 +1,4 @@ +1ҿڻϻκζ +2ı仭ɫ +3ı仭ʴС +4ͼƬ湦 \ No newline at end of file