Skip to content

Commit

Permalink
Merge pull request #958 from C-KIANG/master
Browse files Browse the repository at this point in the history
#2 #519 第三次实验
  • Loading branch information
zengsn authored Mar 24, 2019
2 parents 6688cde + 67d6782 commit d4ec3b2
Show file tree
Hide file tree
Showing 42 changed files with 1,104 additions and 0 deletions.
43 changes: 43 additions & 0 deletions students/soft1714080902307/Test03/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.edu.hzuapps.androidlabs.soft1714080902307">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".Soft1714080902307Activity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Module.AllModuleActivity"
android:label="@string/module_all"
android:theme="@style/AppTheme" />
<activity
android:name=".Module.ToolModuleActivity"
android:label="@string/module_tool"
android:theme="@style/AppTheme" />
<activity
android:name=".Module.WallpaperModuleActivity"
android:label="@string/module_wallpaper"
android:theme="@style/AppTheme" />
<activity
android:name=".Module.MediaModuleActivity"
android:label="@string/module_media"
android:theme="@style/AppTheme" />
<activity
android:name=".Module.EmojiModuleActivity"
android:label="@string/module_emoji"
android:theme="@style/AppTheme" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.edu.hzuapps.androidlabs.soft1714080902307.Module;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.edu.hzuapps.androidlabs.soft1714080902307.R;

public class AllModuleActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_module);

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.edu.hzuapps.androidlabs.soft1714080902307.Module;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.edu.hzuapps.androidlabs.soft1714080902307.R;

public class EmojiModuleActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_emoji_module);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.edu.hzuapps.androidlabs.soft1714080902307.Module;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.edu.hzuapps.androidlabs.soft1714080902307.R;

public class MediaModuleActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_media_module);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.edu.hzuapps.androidlabs.soft1714080902307.Module;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.edu.hzuapps.androidlabs.soft1714080902307.R;

public class ToolModuleActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tool_module);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.edu.hzuapps.androidlabs.soft1714080902307.Module;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.edu.hzuapps.androidlabs.soft1714080902307.R;

public class WallpaperModuleActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wallpaper_module);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
package com.edu.hzuapps.androidlabs.soft1714080902307;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ImageButton;

import com.edu.hzuapps.androidlabs.soft1714080902307.Module.AllModuleActivity;
import com.edu.hzuapps.androidlabs.soft1714080902307.Module.EmojiModuleActivity;
import com.edu.hzuapps.androidlabs.soft1714080902307.Module.MediaModuleActivity;
import com.edu.hzuapps.androidlabs.soft1714080902307.Module.ToolModuleActivity;
import com.edu.hzuapps.androidlabs.soft1714080902307.Module.WallpaperModuleActivity;

public class Soft1714080902307Activity extends AppCompatActivity

implements NavigationView.OnNavigationItemSelectedListener {
private ImageButton imageButton0;
private ImageButton imageButton1;
private ImageButton imageButton2;
private ImageButton imageButton3;
private ImageButton imageButton4;
private ImageButton imageButton5;
private MenuItem item;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);


ImageButton imageButton0 = findViewById(R.id.nav_all);

imageButton0.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Soft1714080902307Activity.this, AllModuleActivity.class);
startActivity(intent);
}
});

ImageButton imageButton1 = findViewById(R.id.nav_tool);

imageButton1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Soft1714080902307Activity.this, ToolModuleActivity.class);
startActivity(intent);
}
});
ImageButton imageButton2 = findViewById(R.id.nav_wallpaper);

imageButton2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Soft1714080902307Activity.this, WallpaperModuleActivity.class);
startActivity(intent);
}
});

ImageButton imageButton3 = findViewById(R.id.nav_emoji);
imageButton3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Soft1714080902307Activity.this, EmojiModuleActivity.class);
startActivity(intent);
}
});
ImageButton imageButton4 = findViewById(R.id.nav_media);
imageButton4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Soft1714080902307Activity.this, MediaModuleActivity.class);
startActivity(intent);
}
});



Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton fab = 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();
}

});

DrawerLayout drawer = findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();

NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
}

@Override
public void onBackPressed() {
DrawerLayout drawer = findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.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);
}

@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {

int item_id = item.getItemId();

switch (item_id)
{
case R.id.nav_home:

Intent intent0 = new Intent();

intent0.setClass(Soft1714080902307Activity.this, Soft1714080902307Activity.class);

startActivity(intent0);

/*Soft1714080902307Activity.this.finish();*/
break;
case R.id.nav_media:

Intent intent1 = new Intent();

intent1.setClass(Soft1714080902307Activity.this, MediaModuleActivity.class);

startActivity(intent1);
break;
case R.id.nav_wallpaper:

Intent intent2 = new Intent();

intent2.setClass(Soft1714080902307Activity.this, WallpaperModuleActivity.class);

startActivity(intent2);
break;
case R.id.nav_tool:

Intent intent3 = new Intent();

intent3.setClass(Soft1714080902307Activity.this, ToolModuleActivity.class);

startActivity(intent3);
break;
case R.id.nav_emoji:

Intent intent4 = new Intent();

intent4.setClass(Soft1714080902307Activity.this, ToolModuleActivity.class);

startActivity(intent4);
break;

}
return true;
}


}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
</vector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d4ec3b2

Please sign in to comment.