Commit b7721fdc authored by rakam's avatar rakam

Removes ResulatFragment on small screens

parent 911ed1a7
......@@ -184,7 +184,8 @@ public class MatchSetupActivity extends Activity implements OnMatchSelectedListe
@Override
public void onMatchSelected(MatchInfo match) {
this.match = match;
resultFragment.setMatchInfos(match);
if (resultFragment != null)
resultFragment.setMatchInfos(match);
if (match != null && match.getCategory().contains("D")
&& !flow.get(1).equals(SelectRefereeingTypeFragment.class.getName())) {
flow.add(1, SelectRefereeingTypeFragment.class.getName());
......@@ -197,7 +198,8 @@ public class MatchSetupActivity extends Activity implements OnMatchSelectedListe
@Override
public void onRefereeingTypeChange(int type) {
refereeingType = type;
resultFragment.setRefereeingType(type);
if (resultFragment != null)
resultFragment.setRefereeingType(type);
}
@Override
......@@ -211,40 +213,47 @@ public class MatchSetupActivity extends Activity implements OnMatchSelectedListe
}
public void onPlayerA1Change(PlayerInfo playerInfo) {
resultFragment.setPlayerA1(playerInfo);
if (resultFragment != null)
resultFragment.setPlayerA1(playerInfo);
playerA1 = playerInfo;
}
public void onPlayerA2Change(PlayerInfo playerInfo) {
resultFragment.setPlayerA2(playerInfo);
if (resultFragment != null)
resultFragment.setPlayerA2(playerInfo);
playerA2 = playerInfo;
}
public void onPlayerB1Change(PlayerInfo playerInfo) {
resultFragment.setPlayerB1(playerInfo);
if (resultFragment != null)
resultFragment.setPlayerB1(playerInfo);
playerB1 = playerInfo;
}
public void onPlayerB2Change(PlayerInfo playerInfo) {
resultFragment.setPlayerB2(playerInfo);
if (resultFragment != null)
resultFragment.setPlayerB2(playerInfo);
playerB2 = playerInfo;
}
@Override
public void onFirstServiceChange(TeamInfo teamInfo) {
resultFragment.setFirstService(teamInfo);
if (resultFragment != null)
resultFragment.setFirstService(teamInfo);
firstServerTeam = teamInfo;
}
@Override
public void onInitialSideChange(int side) {
resultFragment.setServiceSide(side);
if (resultFragment != null)
resultFragment.setServiceSide(side);
this.side = side;
}
@Override
public void onSelectedCourtChange(int idCourt) {
if (resultFragment != null)
resultFragment.setCourt(idCourt);
this.idCourt = idCourt;
resultFragment.setCourt(idCourt);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="horizontal"
android:weightSum="100">
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="75"
android:background="#fff"/>
<fragment
android:id="@+id/resultFragment"
android:name="fr.istic.masteru.android.fragments.ResultFragment"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="25"
android:background="#eee"
tools:layout="@layout/result_fragment"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="horizontal"
android:weightSum="100">
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="0px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="75"
android:background="#fff"/>
<fragment
android:id="@+id/resultFragment"
android:name="fr.istic.masteru.android.fragments.ResultFragment"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="25"
android:background="#eee"
tools:layout="@layout/result_fragment"/>
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment