forked from hzuapps/android-labs-2017
-
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
6 changed files
with
289 additions
and
5 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...p/src/main/java/edu/hzuapps/androidlabs/homeworks/layout/fragment_net1414080903234__m.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,15 @@ | ||
<FrameLayout 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" | ||
tools:context="edu.hzuapps.androidlabs.homework.net1414080903234.Net1414080903234_M"> | ||
|
||
<!-- TODO: Update blank fragment layout --> | ||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="@string/hello_blank_fragment" | ||
android:gravity="center" | ||
android:id="@+id/tview"/> | ||
|
||
</FrameLayout> |
16 changes: 16 additions & 0 deletions
16
AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903234/Income.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,16 @@ | ||
package edu.hzuapps.androidlabs.homework.net1414080903234; | ||
|
||
/** | ||
* Created by admin on 2017/4/14. | ||
*/ | ||
|
||
public class Income { | ||
private String drawee; | ||
private double income; | ||
private String in_date; | ||
public void Income(String user,double in, String date){ | ||
drawee = user; | ||
income = in; | ||
in_date = date; | ||
} | ||
} |
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
80 changes: 80 additions & 0 deletions
80
.../src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903234/Net1414080903234_M.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,80 @@ | ||
package edu.hzuapps.androidlabs.homework.net1414080903234; | ||
|
||
import android.content.Context; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.TextView; | ||
|
||
|
||
/** | ||
* A simple {@link Fragment} subclass. | ||
* Activities that contain this fragment must implement the | ||
* {@link Net1414080903234_M.OnFragmentInteractionListener} interface | ||
* to handle interaction events. | ||
* Use the {@link Net1414080903234_M#newInstance} factory method to | ||
* create an instance of this fragment. | ||
*/ | ||
public class Net1414080903234_M extends Fragment { | ||
// TODO: Rename parameter arguments, choose names that match | ||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | ||
|
||
// TODO: Rename and change types of parameters | ||
private String mContext; | ||
private TextView mTextview; | ||
private OnFragmentInteractionListener mListener; | ||
|
||
public Net1414080903234_M() { | ||
// Required empty public constructor | ||
} | ||
/** | ||
* Use this factory method to create a new instance of | ||
* this fragment using the provided parameters. | ||
* | ||
* @return A new instance of fragment Net1414080903234_M. | ||
*/ | ||
// TODO: Rename and change types and number of parameters | ||
public static Net1414080903234_M newInstance(String message) { | ||
Net1414080903234_M fragment = new Net1414080903234_M(); | ||
Bundle args = new Bundle(); | ||
args.putString("message", message); | ||
fragment.setArguments(args); | ||
return fragment; | ||
} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
|
||
mContext = getArguments().getString("message"); | ||
View view = inflater.inflate(R.layout.fragment_net1414080903234__m,container,false); | ||
mTextview = (TextView)view.findViewById(R.id.tview); | ||
mTextview.setText(mContext); | ||
return view; | ||
} | ||
|
||
// TODO: Rename method, update argument and hook method into UI event | ||
/** | ||
* This interface must be implemented by activities that contain this | ||
* fragment to allow an interaction in this fragment to be communicated | ||
* to the activity and potentially other fragments contained in that | ||
* activity. | ||
* <p> | ||
* See the Android Training lesson <a href= | ||
* "http://developer.android.com/training/basics/fragments/communicating.html" | ||
* >Communicating with Other Fragments</a> for more information. | ||
*/ | ||
public interface OnFragmentInteractionListener { | ||
// TODO: Update argument type and name | ||
void onFragmentInteraction(Uri uri); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
AndroidLabs/app/src/main/java/edu/hzuapps/androidlabs/homeworks/net1414080903234/Outlay.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,17 @@ | ||
package edu.hzuapps.androidlabs.homework.net1414080903234; | ||
|
||
/** | ||
* Created by admin on 2017/4/14. | ||
*/ | ||
|
||
public class Outlay { | ||
private double outlay; | ||
private String usage; | ||
private String out_date; | ||
|
||
public Outlay(double out,String use, String date){ | ||
outlay = out; | ||
usage = use; | ||
out_date = date; | ||
} | ||
} |
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