This repository has been archived by the owner on Apr 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an example implementation of the counters in an AutonomousFragment
- Loading branch information
Ryan Zoeller
committed
Oct 13, 2013
1 parent
aab6ea0
commit cb1a14e
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
ScoutingApp/src/main/java/com/kingtec2169/scouting/AutonomousFragment.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
package com.kingtec2169.scouting; | |||
|
|||
|
|||
import android.os.Bundle; | |||
import android.support.v4.app.Fragment; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
|
|||
/** | |||
* Created by rtzoeller on 10/13/13. | |||
*/ | |||
public class AutonomousFragment extends Fragment { | |||
@Override | |||
public void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
} | |||
|
|||
@Override | |||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |||
View layout = inflater.inflate(R.layout.fragment_autonomous, container, false); | |||
|
|||
((Counter)layout.findViewById(R.id.high_goal)).setFloor(0); | |||
((Counter)layout.findViewById(R.id.medium_goal)).setFloor(0); | |||
((Counter)layout.findViewById(R.id.low_goal)).setFloor(0); | |||
|
|||
return layout; | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:orientation="vertical" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
|
|||
<com.kingtec2169.scouting.Counter | |||
android:id="@+id/high_goal" | |||
android:layout_height="wrap_content" | |||
android:layout_width="match_parent"/> | |||
|
|||
<com.kingtec2169.scouting.Counter | |||
android:id="@+id/medium_goal" | |||
android:layout_height="wrap_content" | |||
android:layout_width="match_parent"/> | |||
|
|||
<com.kingtec2169.scouting.Counter | |||
android:id="@+id/low_goal" | |||
android:layout_height="wrap_content" | |||
android:layout_width="match_parent"/> | |||
|
|||
</LinearLayout> |