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

Zobrazování zoomovaných článků a jejich bublin v dialogu

parent dc570cbc
......@@ -21,13 +21,15 @@
android:id="@+id/frame_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false" >
android:background="@color/light_tansparent"
android:gravity="center" >
<ImageView
android:id="@+id/imageView_column"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/newuser_dialog_background"
android:src="@color/transparent" />
<cz.nic.tablexia.widget.RatioPositionTextView
......@@ -42,14 +44,14 @@
android:textSize="@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility="gone"
custom:displayRatioType="height"
custom:xPositionRatio="0.00"
custom:xPositionRatio="0.2"
custom:yPositionRatio="0.1" />
<cz.nic.tablexia.widget.RatioPositionTextView
android:id="@+id/newuseranim_bubble_balloon"
android:layout_width="@dimen/newuseranim_newspaper_topicbubble_width"
android:layout_height="@dimen/newuseranim_newspaper_topicbubble_height"
android:background="@drawable/newuser_helpbubble_straight"
android:background="@drawable/newuser_helpbubble_left"
android:gravity="center"
android:minEms="2"
android:text="@string/newuseranim_topic_2"
......@@ -57,8 +59,8 @@
android:textSize="@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility="gone"
custom:displayRatioType="height"
custom:xPositionRatio="0.00"
custom:yPositionRatio="0.1" />
custom:xPositionRatio="0.2"
custom:yPositionRatio="0.2" />
<cz.nic.tablexia.widget.RatioPositionTextView
android:id="@+id/newuseranim_bubble_motocycle"
......@@ -72,14 +74,14 @@
android:textSize="@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility="gone"
custom:displayRatioType="height"
custom:xPositionRatio="0.00"
custom:xPositionRatio="0.2"
custom:yPositionRatio="0.1" />
<cz.nic.tablexia.widget.RatioPositionTextView
android:id="@+id/newuseranim_bubble_swimsuit"
android:layout_width="@dimen/newuseranim_newspaper_topicbubble_width"
android:layout_height="@dimen/newuseranim_newspaper_topicbubble_height"
android:background="@drawable/newuser_helpbubble_straight"
android:background="@drawable/newuser_helpbubble_left"
android:gravity="center"
android:minEms="2"
android:text="@string/newuseranim_topic_4"
......@@ -87,7 +89,7 @@
android:textSize="@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility="gone"
custom:displayRatioType="height"
custom:xPositionRatio="0.00"
custom:xPositionRatio="0.2"
custom:yPositionRatio="0.1" />
<cz.nic.tablexia.widget.RatioPositionTextView
......@@ -102,7 +104,7 @@
android:textSize="@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility="gone"
custom:displayRatioType="height"
custom:xPositionRatio="0.00"
custom:xPositionRatio="0.15"
custom:yPositionRatio="0.1" />
</RelativeLayout>
\ No newline at end of file
......@@ -45,6 +45,7 @@
<color name="main_menu_divider">#c7b299</color>
<color name="mainmenu_childimte_border">#cbb69c</color>
<color name="dark_tansparent">#BB000000</color>
<color name="light_tansparent">#88000000</color>
<color name="screen_encyclopedia_background">#f8ecd4</color>
<color name="screen_loader_versionname">#536b73</color>
......
......@@ -4,13 +4,15 @@
package cz.nic.tablexia.newusers.fragment;
import android.app.Dialog;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.support.v4.content.LocalBroadcastManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import cz.nic.tablexia.R;
import cz.nic.tablexia.widget.TablexiaDialog;
......@@ -23,9 +25,9 @@ public class NewspaperDialog extends TablexiaDialog {
public static final String DETECTIVE_KEY = "DETECTIVE";
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Dialog dialog = super.onCreateDialog(savedInstanceState);
return dialog;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(STYLE_NO_FRAME, android.R.style.Theme_Holo_Light);
}
@Override
......@@ -36,12 +38,24 @@ public class NewspaperDialog extends TablexiaDialog {
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Rect displayRectangle = new Rect();
Window window = getActivity().getWindow();
window.getDecorView().getWindowVisibleDisplayFrame(displayRectangle);
// inflate and adjust layout
view.setMinimumWidth(displayRectangle.width());
view.setMinimumHeight(displayRectangle.height());
int idBubble = getArguments().getInt(BUBBLE_KEY);
int idImage = getArguments().getInt(IMAGE_KEY);
view.findViewById(idBubble).setVisibility(View.VISIBLE);
ImageView iv = (ImageView) view.findViewById(R.id.imageView_column);
iv.setImageResource(idImage);
iv.setScaleType(ScaleType.FIT_CENTER);
iv.setAdjustViewBounds(true);
view.setOnClickListener(new OnClickListener() {
@Override
......
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