Project

General

Profile

« Previous | Next » 

Revision b4ee249e

Added by Leszek Koltunski about 1 year ago

Dialog About.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogAbout.java
15 15
import android.content.pm.PackageManager;
16 16
import android.content.res.Resources;
17 17
import android.net.Uri;
18
import android.util.TypedValue;
18 19
import android.view.View;
19 20
import android.view.Window;
20 21
import android.view.WindowManager;
......
105 106

  
106 107
  public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size)
107 108
    {
108
    int margin= (int)(mHeight*0.010f);
109
    int titleH= (int)(mHeight*0.035f);
110
    int padd  = (int)(mHeight*0.010f);
109
    int width = (int)Math.min( mHeight*0.60f,mWidth*0.90f );
110
    int sS= (int)(width*0.043f);
111
    int bS= (int)(width*0.060f);
111 112

  
112
    TextView newV = view.findViewById(R.id.new_message);
113
    TextView shaV = view.findViewById(R.id.about_share_string);
114
    TextView emaV = view.findViewById(R.id.about_mail_string);
115
    TextView addV = view.findViewById(R.id.about_mail_address);
116

  
117
    TextView newV = view.findViewById(R.id.about_new_message);
113 118
    newV.setText(WHATS_NEW);
114
    TextView comV = view.findViewById(R.id.coming_message);
119
    TextView comV = view.findViewById(R.id.about_coming_message);
115 120
    comV.setText(WHATS_COMING);
116 121

  
117 122
    LinearLayout layoutShare = view.findViewById(R.id.about_share_layout);
......
135 140
         email(act);
136 141
         }
137 142
       });
143

  
144
    shaV.setTextSize(TypedValue.COMPLEX_UNIT_PX, bS);
145
    emaV.setTextSize(TypedValue.COMPLEX_UNIT_PX, bS);
146
    addV.setTextSize(TypedValue.COMPLEX_UNIT_PX, sS);
147
    newV.setTextSize(TypedValue.COMPLEX_UNIT_PX, sS);
148
    comV.setTextSize(TypedValue.COMPLEX_UNIT_PX, sS);
138 149
    }
139 150

  
140 151
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/res/layout/dialog_about.xml
8 8
    <LinearLayout
9 9
        android:id="@+id/about_share_layout"
10 10
        android:layout_width="fill_parent"
11
        android:layout_height="100dp"
11
        android:layout_height="0dp"
12
        android:layout_weight="0.4"
12 13
        android:gravity="center|fill_horizontal"
13 14
        android:layout_marginLeft="10dp"
14 15
        android:layout_marginRight="10dp"
......
49 50
   <LinearLayout
50 51
        android:id="@+id/about_email_layout"
51 52
        android:layout_width="fill_parent"
52
        android:layout_height="100dp"
53
        android:layout_height="0dp"
54
        android:layout_weight="0.4"
53 55
        android:gravity="center|fill_horizontal"
54 56
        android:layout_marginLeft="10dp"
55 57
        android:layout_marginRight="10dp"
......
84 86
               android:layout_marginLeft="10dp"
85 87
               android:layout_marginRight="10dp"
86 88
               android:layout_marginBottom="5dp"/>
87
            <TextView
88
               android:id="@+id/about_mail_address_string"
89
               android:layout_width="wrap_content"
90
               android:layout_height="wrap_content"
91
               android:gravity="start"
92
               android:textSize="14sp"
93
               android:text="@string/email"
94
               android:layout_marginLeft="10dp"
95
               android:layout_marginRight="10dp"/>
96 89
            <TextView
97 90
               android:id="@+id/about_mail_address"
98 91
               android:layout_width="wrap_content"
......
110 103
   <LinearLayout
111 104
        android:id="@+id/about_new_layout"
112 105
        android:layout_width="fill_parent"
113
        android:layout_height="150dp"
106
        android:layout_height="0dp"
107
        android:layout_weight="1"
114 108
        android:gravity="center|fill_horizontal"
115 109
        android:layout_marginLeft="10dp"
116 110
        android:layout_marginRight="10dp"
......
143 137
                 android:orientation="vertical">
144 138

  
145 139
                 <TextView
146
                     android:id="@+id/new_message"
140
                     android:id="@+id/about_new_message"
147 141
                     android:layout_width="match_parent"
148 142
                     android:layout_height="match_parent"
149
                     android:text="@string/credits1"
150 143
                     android:gravity="start"/>
151 144
            </LinearLayout>
152 145
        </ScrollView>
......
155 148
   <LinearLayout
156 149
        android:id="@+id/about_coming_layout"
157 150
        android:layout_width="fill_parent"
158
        android:layout_height="150dp"
151
        android:layout_height="0dp"
152
        android:layout_weight="1"
159 153
        android:gravity="center|fill_horizontal"
160 154
        android:layout_marginLeft="10dp"
161 155
        android:layout_marginRight="10dp"
......
188 182
                 android:orientation="vertical">
189 183

  
190 184
                 <TextView
191
                     android:id="@+id/coming_message"
185
                     android:id="@+id/about_coming_message"
192 186
                     android:layout_width="match_parent"
193 187
                     android:layout_height="match_parent"
194
                     android:text="@string/credits2"
195 188
                     android:gravity="start"/>
196 189
            </LinearLayout>
197 190
        </ScrollView>

Also available in: Unified diff