Skip to content

Commit

Permalink
Merge pull request #336 from mokulai/master
Browse files Browse the repository at this point in the history
#3 #30 第三次作业
  • Loading branch information
zengsn authored May 22, 2017
2 parents e38e0b3 + 64b3403 commit 737dd8e
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 358 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class Net1414080903240Activity extends AppCompatActivity {
private Button btn_send1;
private Button btn_send2;
@Override

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_1414080903240);
Expand All @@ -28,8 +28,8 @@ public void onClick(View v) {
btn_send2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Net1414080903240Activity.this,Net1414080903240_OrderRecord.class);
startActivity(intent);
Intent intent1 = new Intent(Net1414080903240Activity.this,Net1414080903240_OrderRecord.class);
startActivity(intent1);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;

import com.google.android.gms.common.api.GoogleApiClient;

Expand All @@ -26,11 +27,14 @@ protected void onCreate(Bundle savedInstanceState) {
btn_send.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

if(!value.getText().toString().equals("")){
Intent intent = new Intent(Net1414080903240_NewAccount.this,Net1414080903240_OrderRecord.class);
intent.putExtra("value",value.getText().toString().trim());
intent.putExtra("spinner1",spinner1.getSelectedItem().toString().trim());
startActivity(intent);
}else if(value.getText().toString()==""){
Toast.makeText(Net1414080903240_NewAccount.this,"没有数据", Toast.LENGTH_SHORT).show();
}
}
});

Expand Down
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 @@ -3,12 +3,24 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
android:background="#8ab6fd"
>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal"

android:background="#ffffff"
>
<LinearLayout
android:id="@+id/value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="15dp"

android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
Expand All @@ -21,8 +33,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:paddingRight="5dp"
android:text=" 订单金额 : "


android:text="订单金额: "
/>
<TextView
android:id="@+id/tt_value"
Expand All @@ -33,11 +46,11 @@

/>
</LinearLayout>

<View style="@style/bg_line" android:layout_below="@+id/value"/>
<LinearLayout
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="15dp"
android:layout_below="@+id/value"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
Expand All @@ -61,6 +74,7 @@
android:paddingRight="5dp"
/>
</LinearLayout>
<View style="@style/bg_line" android:layout_below="@+id/date"/>
<LinearLayout
android:id="@+id/project"
android:layout_width="match_parent"
Expand Down Expand Up @@ -88,7 +102,7 @@
android:paddingRight="5dp"
/>
</LinearLayout>

<View style="@style/bg_line" android:layout_below="@+id/project"/>
<LinearLayout
android:id="@+id/remark"
android:layout_width="match_parent"
Expand Down Expand Up @@ -118,3 +132,4 @@
</LinearLayout>

</RelativeLayout>
</RelativeLayout>
43 changes: 32 additions & 11 deletions AndroidLabs/app/src/main/res/layout/main_1414080903240.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
<RelativeLayout 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"
android:background="#8ab6fd"
>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/headline"
android:id="@+id/imageView8"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />




<Button
android:id="@+id/button1"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_marginTop="143dp"
android:layout_width="200dp"
android:layout_height="100dp"
android:text="新增账目"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
android:textColor="#226663"
android:background="@drawable/button_style"

android:layout_marginBottom="84dp"
android:layout_alignBottom="@+id/button2"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/button2"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_marginTop="63dp"
android:layout_width="200dp"
android:layout_height="100dp"
android:text="查看当前账目"
android:layout_below="@+id/button1"
android:layout_centerHorizontal="true" />

android:color="#f7f7ed"
android:textColor="#226663"
android:layout_gravity="center_horizontal"
android:background="@drawable/button_style"
android:layout_weight="0.10"
android:layout_below="@+id/imageView8"
android:layout_alignLeft="@+id/button1"
android:layout_alignStart="@+id/button1"
android:layout_marginTop="30dp" />
</RelativeLayout>
82 changes: 0 additions & 82 deletions AndroidLabs/app/src/main/res/layout/newaccount_1414080903240.xml

This file was deleted.

Loading

0 comments on commit 737dd8e

Please sign in to comment.