Skip to content

Commit

Permalink
hzuapps#4 实验四代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Peiweilu committed Apr 27, 2019
1 parent 88a4d0d commit c7040dd
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 102 deletions.
4 changes: 2 additions & 2 deletions students/com1709081602330/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Com1709081602330Activity2"></activity>
<activity android:name=".Com1709081602330Activity">
<activity android:name=".Sports_sort"></activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package edu.hzuapps.androidlabs.com1709081602330;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
private Button select_sort;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button select_sort = (Button) findViewById(R.id.select_sort);
select_sort.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(MainActivity.this,Sports_sort.class);
startActivity(intent);
}
});
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

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

public class Com1709081602330Activity2 extends AppCompatActivity {

public class Sports_sort extends AppCompatActivity {
private Button basketball;
private Button football;
private Button tennis;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.com_1709081602330_activity2);
setContentView(R.layout.activity_sports_sort);
}

}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout 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=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="体育比赛直播间"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/select_sort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择分类"
/>
<ImageView
android:id="@+id/image_view"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src = "@drawable/img_1"
/>

</TableLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"


tools:context=".Sports_sort">

<Button
android:id="@+id/basketball"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="篮球"/>
<Button
android:id="@+id/football"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="足球"/>
<Button
android:id="@+id/tennis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="网球"/>

</LinearLayout>

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions students/com1709081602330/app/src/main/res/values/colors.xml

This file was deleted.

4 changes: 0 additions & 4 deletions students/com1709081602330/app/src/main/res/values/strings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions students/com1709081602330/app/src/main/res/values/styles.xml

This file was deleted.

0 comments on commit c7040dd

Please sign in to comment.