forked from hzuapps/android-labs-2020
-
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
1 parent
1657e21
commit 875df34
Showing
8 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...ts/net1814080903122/src/main/java/edu/hzuapps/androidlabs/presenter/SchedulesAdapter.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,47 @@ | ||
package edu.hzuapps.androidlabs.presenter; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.BaseAdapter; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import edu.hzuapps.androidlabs.R; | ||
import edu.hzuapps.androidlabs.model.SchedulesModel; | ||
import edu.hzuapps.androidlabs.view.SchedulesFragment; | ||
|
||
public class SchedulesAdapter extends BaseAdapter { | ||
private SchedulesFragment fragment = null; | ||
private SchedulesModel schedulesModel = null; | ||
|
||
public SchedulesAdapter(SchedulesFragment schedulesFragment){ | ||
|
||
this.fragment = schedulesFragment; | ||
this.schedulesModel = SchedulesModel.getInstance(); | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return 8; | ||
} | ||
|
||
@Override | ||
public Object getItem(int position) { | ||
return SchedulesModel.getItem(position); | ||
} | ||
|
||
@Override | ||
public long getItemId(int position) { | ||
return position; | ||
} | ||
|
||
@Override | ||
public View getView(int position, View convertView, ViewGroup parent) { | ||
LayoutInflater layoutInflater = (LayoutInflater) LayoutInflater.from(fragment.getActivity()); | ||
convertView = layoutInflater.inflate(R.layout.iteam_schedules, null,true); | ||
TextView textView = (TextView)convertView.findViewById(R.id.task_Text); | ||
Button button = (Button)convertView.findViewById(R.id.delete_Button); | ||
return convertView; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
students/net1814080903122/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,68 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.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=".view.MainActivity"> | ||
|
||
<RadioGroup | ||
android:id="@+id/radioGroup" | ||
android:layout_width="match_parent" | ||
android:layout_height="80dp" | ||
android:background="#fdfff4" | ||
android:gravity="center" | ||
android:orientation="horizontal" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent"> | ||
|
||
<RadioButton | ||
android:checked="true" | ||
android:id="@+id/schedulesButton" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_gravity="center" | ||
android:layout_weight="1" | ||
android:button="@null" | ||
android:text="" | ||
android:textAlignment="center" | ||
android:textColor="@color/nav_color" | ||
android:textSize="45sp" /> | ||
|
||
<RadioButton | ||
android:id="@+id/timerButton" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_gravity="center" | ||
android:layout_weight="1" | ||
android:button="@null" | ||
android:text="" | ||
android:textAlignment="center" | ||
android:textColor="@color/nav_color" | ||
android:textSize="45sp" /> | ||
|
||
<RadioButton | ||
android:id="@+id/videoButton" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_gravity="center" | ||
android:layout_weight="1" | ||
android:button="@null" | ||
android:text="" | ||
android:textAlignment="center" | ||
android:textColor="@color/nav_color" | ||
android:textSize="45sp" /> | ||
</RadioGroup> | ||
|
||
<FrameLayout | ||
|
||
android:id="@+id/fragment_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toTopOf="@+id/radioGroup" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
</FrameLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
10 changes: 10 additions & 0 deletions
10
students/net1814080903122/src/main/res/layout/fragment_schedules.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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<ListView | ||
android:id="@+id/schedulesList" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
</LinearLayout> |
80 changes: 80 additions & 0 deletions
80
students/net1814080903122/src/main/res/layout/fragment_timer.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,80 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.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" | ||
android:visibility="visible"> | ||
|
||
<Button | ||
android:id="@+id/selectButton" | ||
android:layout_width="fill_parent" | ||
android:layout_height="50dp" | ||
android:layout_weight="1" | ||
android:text="运动方式" | ||
android:visibility="visible" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<EditText | ||
android:id="@+id/et_timer" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:hint="请输入计时时间" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/selectButton" /> | ||
|
||
<LinearLayout | ||
android:id="@+id/linearLayout2" | ||
android:layout_width="217dp" | ||
android:layout_height="41dp" | ||
android:layout_marginTop="1dp" | ||
android:orientation="horizontal" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/et_timer"> | ||
|
||
<Button | ||
android:id="@+id/startButton" | ||
android:layout_width="105dp" | ||
android:layout_height="match_parent" | ||
android:layout_weight="1" | ||
android:text="开始计时" /> | ||
|
||
<Button | ||
android:id="@+id/stopButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="停止计时" /> | ||
</LinearLayout> | ||
|
||
<TextView | ||
android:id="@+id/text_time" | ||
android:layout_width="fill_parent" | ||
android:layout_height="60dp" | ||
android:gravity="center_horizontal" | ||
android:text=" 计时时间" | ||
android:textAlignment="center" | ||
android:textSize="20dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.0" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" /> | ||
|
||
<TextView | ||
android:id="@+id/text_sport" | ||
android:layout_width="fill_parent" | ||
android:layout_height="60dp" | ||
android:gravity="center_horizontal" | ||
android:text="当前运动方式" | ||
android:textAlignment="center" | ||
android:textSize="20dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.0" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/text_time" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
12 changes: 12 additions & 0 deletions
12
students/net1814080903122/src/main/res/layout/fragment_vedio.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,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<Button | ||
android:id="@+id/button2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="运动视频" /> | ||
</LinearLayout> |
39 changes: 39 additions & 0 deletions
39
students/net1814080903122/src/main/res/layout/iteam_schedules.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,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.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"> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:id="@+id/shcedulesCard" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:ignore="MissingConstraints"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal"> | ||
|
||
<TextView | ||
android:id="@+id/task_Text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="运动场景" /> | ||
|
||
<Button | ||
android:id="@+id/delete_Button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="删除" /> | ||
</LinearLayout> | ||
</androidx.cardview.widget.CardView> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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.