Commit db06843d authored by Luboš Horáček's avatar Luboš Horáček

Oříznuté dialogy s detailem bodu grafu - přesunutí do jiné vrstvy a úprava pozicování

parent 3d0d3812
......@@ -16,26 +16,33 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/screen_statistics"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tablexia_background_wooden"
android:orientation="vertical"
android:paddingRight="15dp"
android:paddingTop="@dimen/screen_statistics_paddingtop" >
<include layout="@layout/screen_statistics_toppanel" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/screen_statistics"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
android:background="@drawable/tablexia_background_wooden"
android:orientation="vertical"
android:paddingRight="15dp"
android:paddingTop="@dimen/screen_statistics_paddingtop" >
<include layout="@layout/screen_statistics_toppanel" />
<include layout="@layout/screen_statistics_cardfile" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<include layout="@layout/screen_statistics_chart" />
<include layout="@layout/screen_statistics_cardfile" />
<include layout="@layout/screen_statistics_chart" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<include layout="@layout/screen_statistics_chart_bubble" />
</FrameLayout>
\ No newline at end of file
......@@ -16,18 +16,24 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/screen_statistics"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tablexia_background_wooden"
android:orientation="vertical"
android:paddingRight="15dp"
android:paddingTop="@dimen/screen_statistics_paddingtop" >
android:layout_height="match_parent" >
<include layout="@layout/screen_statistics_toppanel" />
<LinearLayout
android:id="@+id/screen_statistics"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tablexia_background_wooden"
android:orientation="vertical"
android:paddingRight="15dp"
android:paddingTop="@dimen/screen_statistics_paddingtop" >
<include layout="@layout/screen_statistics_chart" />
<include layout="@layout/screen_statistics_toppanel" />
</LinearLayout>
\ No newline at end of file
<include layout="@layout/screen_statistics_chart" />
</LinearLayout>
<include layout="@layout/screen_statistics_chart_bubble" />
</FrameLayout>
\ No newline at end of file
......@@ -38,11 +38,11 @@
android:layout_alignParentTop="true"
android:baselineAligned="false" >
<RelativeLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="5" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -54,76 +54,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout
android:id="@+id/screen_statistics_chartdetail"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/screen_statistics_chartdetail_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible" >
<cz.nic.tablexia.widget.StatisticsPointDetailBackground
android:layout_width="@dimen/screen_statistics_pointdetail_width"
android:layout_height="@dimen/screen_statistics_pointdetail_height"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<LinearLayout
android:id="@+id/screen_statistics_chartdetail_ratingstars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal" >
<include
android:id="@+id/screen_statistics_ratingstar1"
layout="@layout/screen_statistics_ratingstar" />
<include
android:id="@+id/screen_statistics_ratingstar2"
layout="@layout/screen_statistics_ratingstar" />
<include
android:id="@+id/screen_statistics_ratingstar3"
layout="@layout/screen_statistics_ratingstar" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/screen_statistics_chartdetail_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
<TextView
android:id="@+id/screen_statistics_chartdetail_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</RelativeLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
......
<!--
Tablexia
Copyright (C) 2013 CZ NIC z.s.p.o. <podpora at nic dot cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/screen_statistics_chartdetail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false" >
<FrameLayout
android:id="@+id/screen_statistics_chartdetail_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipChildren="false"
android:visibility="invisible" >
<cz.nic.tablexia.widget.StatisticsPointDetailBackground
android:layout_width="@dimen/screen_statistics_pointdetail_width"
android:layout_height="@dimen/screen_statistics_pointdetail_height"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<LinearLayout
android:id="@+id/screen_statistics_chartdetail_ratingstars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal" >
<include
android:id="@+id/screen_statistics_ratingstar1"
layout="@layout/screen_statistics_ratingstar" />
<include
android:id="@+id/screen_statistics_ratingstar2"
layout="@layout/screen_statistics_ratingstar" />
<include
android:id="@+id/screen_statistics_ratingstar3"
layout="@layout/screen_statistics_ratingstar" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/screen_statistics_chartdetail_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
<TextView
android:id="@+id/screen_statistics_chartdetail_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@android:color/black"
android:textSize="@dimen/screen_statistics_chartdetail_textsize" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -498,10 +498,11 @@ public class Statistics extends AbstractMenuFragment {
double y = selectedSerie.getY(seriesSelection.getPointIndex());
double[] screenPoint = lineChart.toScreenPoint(new double[] { x, y }, 0);
int chartPadding = getActivity().findViewById(R.id.screen_statistics_chart).getPaddingTop();
int[] location = new int[2];
getActivity().findViewById(R.id.screen_statistics_chart).getLocationOnScreen(location);
detailInfoPanel.setX(((float) screenPoint[0] - (detailInfoPanel.getMeasuredWidth() / 2)) + chartPadding);
detailInfoPanel.setY(((float) screenPoint[1] - (detailInfoPanel.getMeasuredHeight() - (detailInfoPanel.getMeasuredHeight() / 9))) + chartPadding);
detailInfoPanel.setX(((float) screenPoint[0] - (detailInfoPanel.getMeasuredWidth() / 2)) + location[0]);
detailInfoPanel.setY(((float) screenPoint[1] - (detailInfoPanel.getMeasuredHeight() - (detailInfoPanel.getMeasuredHeight() / 9))) + location[1]);
}
private void prepareDetailInfoPanelValues(GameManager gameManager, double pointValue) {
......
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