Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4 #464 第四次实验 #1300

Merged
merged 1 commit into from
Apr 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions students/com1714080901133/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="edu.hzuapps.androidlabs.Com1714080901133.Com1714080901133Activity"
android:label="@string/title_activity_com1714080901133"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="edu.hzuapps.androidlabs.com1714080901133.Com1714080901133Activity"
android:label="@string/title_activity_com1714080901133"
android:theme="@style/AppTheme.NoActionBar"></activity>
android:label="@string/title_activity_com1714080901133" />
<activity
android:name="edu.hzuapps.androidlabs.com1714080901133.Com1714080901133Activity2"
android:label="@string/title_activity_com17140809011332" />
<activity android:name=".Main2Activity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
package edu.hzuapps.androidlabs.com1714080901133;

import android.content.Intent;
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.app.Activity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.example.ashuo.myapplication.Main2Activity;
import com.example.ashuo.myapplication.MainActivity;
import com.example.ashuo.myapplication.R;

public class Com1714080901133Activity extends AppCompatActivity {
public class Com1714080901133Activity extends Activity {

Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_com1714080901133);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
setContentView(R.layout.com_1714080901133_activity);

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {

button=findViewById(R.id.btn);
button.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();
public void onClick(View v) {
Toast.makeText(Com1714080901133Activity.this, "跳转中,请稍后", Toast.LENGTH_SHORT).show();
Intent i=new Intent(Com1714080901133Activity.this,Com1714080901133Activity2.class);
startActivity(i);
}
});
}

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

import android.os.Bundle;
import android.app.Activity;

import com.example.ashuo.myapplication.R;

public class Com1714080901133Activity2 extends Activity {

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

}
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
@@ -1,33 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="edu.hzuapps.androidlabs.com1714080901133.Com1714080901133Activity">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_com1714080901133" />

<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />

</android.support.design.widget.CoordinatorLayout>
android:text="点击进入"
tools:layout_editor_absoluteX="162dp"
tools:layout_editor_absoluteY="129dp" />
</android.support.constraint.ConstraintLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="edu.hzuapps.androidlabs.com1714080901133.Com1714080901133Activity2">

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/success"
tools:layout_editor_absoluteX="24dp"
tools:layout_editor_absoluteY="90dp" />
</android.support.constraint.ConstraintLayout>
6 changes: 6 additions & 0 deletions students/com1714080901133/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<resources>
<string name="app_name">My Application</string>
<string name="title_activity_com1714080901133">Com1714080901133Activity</string>
<string name="title_activity_com17140809011332">Com1714080901133Activity2</string>
</resources>
11 changes: 11 additions & 0 deletions students/com1714080901133/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>