forked from hzuapps/android-labs-2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
157 additions
and
21 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...14080902339/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902339/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902339; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
//savedInstanceState:已经保存的实例对象 | ||
//实例跟对象都是真正存在内存里的 | ||
/** | ||
* CXY笔记 | ||
* 1.如果数据发生变化,状态就发生变化 | ||
* Data=State | ||
* 2.intent帮我们做交互的 | ||
* 3.所有的交互都是发生在某一个控件上的(无论是图片还是文本)(例如可以通过按钮点击跳转到某张图片上) | ||
*/ | ||
setContentView(R.layout.activity_main); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...080902339/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902339/SecondActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,64 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902339; | ||
|
||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
public class SecondActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.second_activity); | ||
Button button_0 = (Button) findViewById(R.id.button_0 ); | ||
Button button_1 = (Button) findViewById(R.id.button_1 ); | ||
Button button_2 = (Button) findViewById(R.id.button_2 ); | ||
Button button_3 = (Button) findViewById(R.id.button_3 ); | ||
Button button_4 = (Button) findViewById(R.id.button_4 ); | ||
|
||
button_0.setOnClickListener(new View.OnClickListener(){ | ||
@Override | ||
public void onClick(View v){ | ||
Intent intent = new Intent(Intent.ACTION_VIEW); | ||
intent.setData(Uri.parse("http://down.sparke.cn/search/1/1?content=f5a5403271b04b2690960a170c37b7d3&here=1")); | ||
startActivity(intent); | ||
} | ||
}); | ||
button_1.setOnClickListener(new View.OnClickListener(){ | ||
@Override | ||
public void onClick(View v){ | ||
Intent intent = new Intent(Intent.ACTION_VIEW); | ||
intent.setData(Uri.parse("http://down.sparke.cn/search/1/1?content=30916acfac32458c9cfe7b5f8cd620bf&here=1")); | ||
startActivity(intent); | ||
} | ||
}); | ||
button_2.setOnClickListener(new View.OnClickListener(){ | ||
@Override | ||
public void onClick(View v){ | ||
Intent intent = new Intent(Intent.ACTION_VIEW); | ||
intent.setData(Uri.parse("http://down.sparke.cn/search/1/1?content=faa2abd9bb854fdcacb2676d97bfff96&here=1")); | ||
startActivity(intent); | ||
} | ||
}); | ||
button_3.setOnClickListener(new View.OnClickListener(){ | ||
@Override | ||
public void onClick(View v){ | ||
Intent intent = new Intent(Intent.ACTION_VIEW); | ||
intent.setData(Uri.parse("http://down.sparke.cn/search/1/1?content=937c633592974ff39184cc626d729f2f&here=1")); | ||
startActivity(intent); | ||
} | ||
}); | ||
button_4.setOnClickListener(new View.OnClickListener(){ | ||
@Override | ||
public void onClick(View v){ | ||
Intent intent = new Intent(Intent.ACTION_VIEW); | ||
intent.setData(Uri.parse("http://down.sparke.cn/search/1/1?content=4029a6c2f62d478188070f5ce579fcbe&here=1")); | ||
startActivity(intent); | ||
} | ||
}); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
students/soft1714080902339/app/src/main/res/layout/activity_main.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?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=".MainActivity"> | ||
<!-- | ||
笔记 | ||
1.类内有成员变量、类变量(用static定义)两种 | ||
2.成员变量由对象去访问 | ||
3.类变量由类去访问 | ||
--> | ||
<TextView | ||
android:id="@+id/textview_01" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:drawableTop="@drawable/cet46" | ||
|
||
|
||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
</android.support.constraint.ConstraintLayout> |
55 changes: 42 additions & 13 deletions
55
students/soft1714080902339/app/src/main/res/layout/second_activity.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
<?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" | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".SecondActivity"> | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/imageview_01" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal|center" | ||
android:drawableBottom="@drawable/okok" | ||
tools:layout_editor_absoluteX="0dp" | ||
tools:layout_editor_absoluteY="0dp" /> | ||
<Button | ||
android:id="@+id/button_0" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="#808080" | ||
android:text="听力资料" /> | ||
|
||
<Button | ||
android:id="@+id/button_1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="阅读理解" /> | ||
|
||
<Button | ||
android:id="@+id/button_2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="#808080" | ||
android:text="翻译训练" /> | ||
|
||
<Button | ||
android:id="@+id/button_3" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="写作训练" /> | ||
|
||
<Button | ||
android:id="@+id/button_4" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="#808080" | ||
android:text="单词积累" /> | ||
|
||
</android.support.constraint.ConstraintLayout> | ||
|
||
<TextView | ||
android:id="@+id/imageview_01" | ||
android:layout_width="408dp" | ||
android:layout_height="181dp" | ||
android:layout_marginTop="200dp" | ||
android:layout_gravity="center_horizontal|center" | ||
android:drawableBottom="@drawable/okok" /> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<resources> | ||
<string name="app_name">Soft1714080902339</string> | ||
<string name="app_name">最新过关资料</string> | ||
<string name="title_activity_soft1714080902339">Soft1714080902339Activity星火英语</string> | ||
<string name="action_settings">Settings</string> | ||
</resources> |