Skip to content

Commit

Permalink
hzuapps#4 实验四代码
Browse files Browse the repository at this point in the history
  • Loading branch information
1372037590 committed Mar 24, 2019
1 parent 53941f5 commit 2d806e1
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 26 deletions.
2 changes: 2 additions & 0 deletions students/com1714080901115/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
android:theme="@style/AppTheme">
<activity android:name=".Com1714080901115Activity2">
</activity>
<activity android:name=".Com1714080901115Activity3">
</activity>
<activity
android:name=".Com1714080901115Activity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,28 @@
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.ImageView;
public class Com1714080901115Activity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.com_1714080901115_activity);
TextView denglu = findViewById(R.id.textView4);
denglu.setOnClickListener (new View.OnClickListener() {
ImageView self = findViewById(R.id.imageView3);
self.setOnClickListener (new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Com1714080901115Activity.this,Com1714080901115Activity2.class));
}
});
ImageView friend= findViewById(R.id.imageView4);
friend.setOnClickListener (new View.OnClickListener() {
public void onClick(View v1) {
startActivity(new Intent(Com1714080901115Activity.this,Com1714080901115Activity3.class));
}
});

}


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

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

public class Com1714080901115Activity3 extends AppCompatActivity {

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

}
}
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.
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,85 @@
android:layout_height="match_parent"
android:minHeight="151dp"
tools:context=".Com1714080901115Activity">

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginLeft="1dp"
android:layout_marginBottom="556dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView5"
tools:ignore="MissingConstraints">

<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 首页 "
android:textColor="@color/colorPrimary"
android:textSize="36sp"
android:textStyle="bold"
tools:ignore="ObsoleteLayoutParam" />

<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" 个人中心"
android:textColor="@color/colorPrimary"
android:textSize="36sp"
android:textStyle="bold" />

<TextView
android:id="@+id/text3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" 好友"
android:textColor="@color/colorPrimary"
android:textSize="36sp"
android:textStyle="bold" />
</LinearLayout>

<ImageView
android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="387dp"
android:layout_centerVertical="true"
android:layout_marginStart="58dp"
android:layout_marginLeft="58dp"
android:layout_marginEnd="58dp"
android:layout_marginRight="58dp"
android:layout_marginBottom="144dp"
android:drawablePadding="1dp"
android:src="@drawable/a"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_height="0dp"
android:layout_marginEnd="142dp"
android:layout_marginRight="142dp"
android:layout_marginBottom="1dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toStartOf="@+id/imageView4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/music" />

<ImageView
android:id="@+id/imageView3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="150dp"
android:layout_marginRight="150dp"
android:layout_marginBottom="5dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/textView4"
android:layout_width="147dp"
android:layout_height="73dp"
android:layout_marginEnd="34dp"
android:layout_marginRight="34dp"
android:text="我的收藏"
android:textSize="30sp"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/self" />

<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="3dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView" />
app:layout_constraintStart_toEndOf="@+id/imageView"
app:srcCompat="@drawable/friend" />


</android.support.constraint.ConstraintLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Com1714080901115Activity3">

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="好友页面" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="好友1" />
</LinearLayout>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="app_name">My Application</string>
<string name="name2">我的收藏</string>
<string name="name2">个人中心</string>
</resources>

0 comments on commit 2d806e1

Please sign in to comment.