mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
# CourseDesigner: made everything a bit smaller and more aligned to get more data on a view without scrolling.
This commit is contained in:
1 parent
caf8ea0a2c
commit
3d1a94571c
9 files changed
+45
-37
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 1.2 KiB |
@@ -42,6 +42,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="500dp"
|
||||
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
@@ -57,6 +58,7 @@
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:verticalSpacing="5dp"
|
||||
|
||||
+9
-8
@@ -2,7 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.Draggable.Waypoint.Item"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/list_selector"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
@@ -11,7 +11,7 @@
|
||||
<ImageView
|
||||
android:id="@id/drag_handle"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/drag_symbol"
|
||||
android:contentDescription="@string/drag_handle_description" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/Welter.Cell.Draggable.Waypoint.Item.columnOne"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
@@ -38,22 +38,23 @@
|
||||
android:padding="5dp"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="5pt" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.Draggable.Waypoint.Item.txtRoundingDirection"
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="7pt" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Welter.Cell.Draggable.Waypoint.Item.columnThree"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
@@ -72,7 +73,7 @@
|
||||
android:padding="5dp"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="5pt" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,20 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Grid.Mark.Cell"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="98dp" android:id="@+id/Welter.Grid.Mark.Cell"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/list_selector"
|
||||
android:paddingLeft="6dip"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical" >
|
||||
<ImageView android:id="@+id/Welter.Grid.Mark.Cell.imgImage"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/markImage"/>
|
||||
<TextView android:id="@+id/Welter.Grid.Mark.Cell.txtTitle"
|
||||
android:padding="5dp" android:textColor="@drawable/text_selector"
|
||||
android:textSize="10pt"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textSize="9pt"
|
||||
android:gravity="center"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="false">
|
||||
</TextView>
|
||||
|
||||
|
||||
+10
-9
@@ -2,7 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/Welter.Cell.OneRowThreeColumns"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/list_selector"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
@@ -11,13 +11,13 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/Welter.Cell.OneRowThreeColumns.columnOne"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:orientation="vertical">
|
||||
<ImageView android:id="@+id/Welter.Cell.OneRowThreeColumns.columnOne.imgImage"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:gravity="center"
|
||||
android:contentDescription="@string/markImage"/>
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.OneRowThreeColumns.columnOne.txtLeftMark"
|
||||
@@ -26,22 +26,23 @@
|
||||
android:padding="5dp"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="5pt" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/Welter.Cell.OneRowThreeColumns.txtRoundingDirection"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="7pt" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/Welter.Cell.OneRowThreeColumns.columnThree"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<ImageView android:id="@+id/Welter.Cell.OneRowThreeColumns.columnThree.imgImage"
|
||||
android:layout_width="32dp"
|
||||
@@ -55,7 +56,7 @@
|
||||
android:padding="5dp"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:textColor="@drawable/text_selector"
|
||||
android:textSize="9pt" />
|
||||
android:textSize="5pt" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
+2
-2
@@ -16,8 +16,8 @@ import com.sap.sailing.racecommittee.app.utils.MarkImageHelper;
|
||||
|
||||
public class CourseElementListAdapter extends ArrayAdapter<CourseListDataElement> {
|
||||
|
||||
public CourseElementListAdapter(Context context, int textViewResourceId, List<CourseListDataElement> objects) {
|
||||
super(context, textViewResourceId, objects);
|
||||
public CourseElementListAdapter(Context context, List<CourseListDataElement> objects) {
|
||||
super(context, 0, objects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ import com.sap.sailing.racecommittee.app.utils.MarkImageHelper;
|
||||
|
||||
public class DraggableCourseElementListAdapter extends ArrayAdapter<CourseListDataElement> {
|
||||
|
||||
public DraggableCourseElementListAdapter(Context context, int textViewResourceId, List<CourseListDataElement> objects) {
|
||||
super(context, textViewResourceId, objects);
|
||||
public DraggableCourseElementListAdapter(Context context, List<CourseListDataElement> objects) {
|
||||
super(context, 0, objects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ import com.sap.sailing.racecommittee.app.utils.MarkImageHelper;
|
||||
|
||||
public class MarkGridAdapter extends ArrayAdapter<Mark> {
|
||||
|
||||
public MarkGridAdapter(Context context, int textViewResourceId, List<Mark> marks) {
|
||||
super(context, textViewResourceId, marks);
|
||||
public MarkGridAdapter(Context context, List<Mark> marks) {
|
||||
super(context, 0, marks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+8
-7
@@ -107,9 +107,9 @@ public class CourseDesignDialogFragment extends RaceDialogFragment {
|
||||
courseElements = new ArrayList<CourseListDataElement>();
|
||||
previousCourseElements = new ArrayList<CourseListDataElement>();
|
||||
|
||||
gridAdapter = new MarkGridAdapter(getActivity(), R.layout.welter_one_row_no_image, aMarkList);
|
||||
courseElementAdapter = new DraggableCourseElementListAdapter(getActivity(), R.layout.welter_draggable_waypoint_item, courseElements);
|
||||
previousCourseElementAdapter = new CourseElementListAdapter(getActivity(), R.layout.welter_one_row_three_columns, previousCourseElements);
|
||||
gridAdapter = new MarkGridAdapter(getActivity(), aMarkList);
|
||||
courseElementAdapter = new DraggableCourseElementListAdapter(getActivity(), courseElements);
|
||||
previousCourseElementAdapter = new CourseElementListAdapter(getActivity(), previousCourseElements);
|
||||
|
||||
loadMarks();
|
||||
loadCourseOnServer();
|
||||
@@ -177,10 +177,11 @@ public class CourseDesignDialogFragment extends RaceDialogFragment {
|
||||
|
||||
public void onClick(View arg0) {
|
||||
if (!previousCourseElements.isEmpty()) {
|
||||
if (!courseElements.isEmpty())
|
||||
if (!courseElements.isEmpty()) {
|
||||
createUsePreviousCourseDialog();
|
||||
else
|
||||
} else {
|
||||
copyPreviousToNewCourseDesign();
|
||||
}
|
||||
}
|
||||
else {
|
||||
Toast.makeText(getActivity(), "No course available to copy", Toast.LENGTH_LONG).show();
|
||||
@@ -254,9 +255,9 @@ public class CourseDesignDialogFragment extends RaceDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onLoadSucceded(CourseBase data) {
|
||||
if (Util.size(data.getWaypoints()) > 0) {
|
||||
/*if (Util.size(data.getWaypoints()) > 0) {
|
||||
fillPreviousCourseElementsInList(data);
|
||||
} else {
|
||||
} else*/ {
|
||||
fillPreviousCourseElementsWithLastPublishedCourseDesign();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user