Skip to content

Commit

Permalink
hzuapps#4 提交实验4代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zengjundong committed Mar 27, 2019
1 parent dbce0ac commit 9daf2b8
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 62 deletions.
3 changes: 1 addition & 2 deletions students/com1714080901131/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Com1714080901131Activity2">
android:label
<activity android:name=".Com1714080901131Activity2" android:label="@string/edit_title_text">
</activity>
<activity android:name=".Com1714080901131Activity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Button;

public class Com1714080901131Activity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.com_1714080901131_activity);
TextView text=findViewById(R.id.textView2);
text.setOnClickListener(new View.OnClickListener() {
Button b=findViewById(R.id.createButton);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Com1714080901131Activity.this,Com1714080901131Activity2.class);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
<?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:id="@+id/layout"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bizhi"
tools:context=".Com1714080901131Activity">
android:background="#fffff0"
android:orientation="vertical">

<TextView
android:id="@+id/english_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="72dp"
android:gravity="center_horizontal"
android:text="[perent]"
android:textColor="@android:color/white"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:paddingTop="10dp">

<TextView
android:id="@+id/date_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/date"
android:textColor="@android:color/white"
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/createButton"
android:dividerHeight="1dp"></ListView>

android:textSize="17dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="17dp"
android:layout_marginRight="17dp"
android:layout_marginBottom="10dp"
android:text="@string/WrongTxt"
app:layout_constraintBottom_toTopOf="@+id/english_text"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/createButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:text="@string/create_button_name"
android:textSize="20sp" />
</RelativeLayout>


</android.support.constraint.ConstraintLayout>
</LinearLayout>
Original file line number Diff line number Diff line change
@@ -1,19 +1,83 @@
<?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:background="@drawable/bizhi"
tools:context=".Com1714080901131Activity2">
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#fffff0"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/headLayout"
android:orientation="horizontal"
>

<TextView
android:layout_width="match_parent"
android:layout_height="30dp"
android:textColor="@color/colorPrimaryDark"
android:textSize="15sp"
android:gravity="center"
android:text="@string/edit_title_text"
/>

</LinearLayout>

<RelativeLayout
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
>

<LinearLayout
android:id="@+id/edit_title_lay_lay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>



<LinearLayout
android:id="@+id/edit_title_lay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_tile"
android:textSize="15sp"
/>
<EditText
android:id="@+id/edit_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:hint="@string/edit_hint"

/>
</LinearLayout>

</LinearLayout>

<EditText
android:id="@+id/edit_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/edit_title_lay_lay"
android:layout_marginTop="10dp"
android:gravity="start"
android:hint="@string/edit_body_hint"
android:textSize="12sp" />

</RelativeLayout>

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/WrongTxt" />

</LinearLayout>
</LinearLayout>
9 changes: 6 additions & 3 deletions students/com1714080901131/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<resources>
<string name="app_name">锁屏背单词</string>
<string name="date">3月21日 星期四</string>
<string name="WrongTxt">错题集界面</string>
<string name="app_name">备忘录</string>
<string name="create_button_name">+\n新建</string>
<string name="text_tile">标题:</string>
<string name="edit_hint">请输入标题</string>
<string name="edit_body_hint">请输入内容...</string>
<string name="edit_title_text">新建备忘录</string>
</resources>

0 comments on commit 9daf2b8

Please sign in to comment.