Project

General

Profile

« Previous | Next » 

Revision 4429d6c8

Added by Leszek Koltunski almost 3 years ago

Downloading updates: dialog progress.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogUpdateView.java
66 66

  
67 67
    TextView title = mView.findViewById(R.id.updates_pane_title);
68 68
    title.setText(info.mObjectLongName);
69
    TextView version = mView.findViewById(R.id.updates_pane_version);
70
    String strVersion = info.mUpdateObject
71
                        ? "v. "+JsonWriter.VERSION_OBJECT_MAJOR+"."+info.mObjectMinorVersion
72
                        : "v. "+JsonWriter.VERSION_EXTRAS_MAJOR+"."+info.mExtrasMinorVersion;
73
    version.setText(strVersion);
74 69
    TextView description = mView.findViewById(R.id.updates_pane_description);
75 70
    description.setText(info.mDescription);
76 71

  
......
81 76
    mView.setLayoutParams(pView);
82 77

  
83 78
    title.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize);
84
    version.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize);
85 79
    description.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize);
86 80
    button.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize);
87 81

  
88 82
    title.setLayoutParams(pText);
89
    version.setLayoutParams(pText);
90 83
    description.setLayoutParams(pText);
91 84
    button.setLayoutParams(pButt);
92 85

  
src/main/java/org/distorted/dialogs/RubikDialogUpdates.java
85 85
    final float titleSize= w*RubikActivity.MENU_BIG_TEXT_SIZE;
86 86
    final float okSize   = w*RubikActivity.DIALOG_BUTTON_SIZE;
87 87
    mMargin              = (int)(w*RubikActivity.MEDIUM_MARGIN);
88
    mSize                = (int)(h*0.19f);
88
    mSize                = (int)(h*0.14f);
89 89
    mFontSize            = (int)(h*0.02f);
90 90

  
91 91
    TextView title = (TextView) inflater.inflate(R.layout.dialog_title, null);
......
173 173
      }
174 174
    else
175 175
      {
176
      //mScroll.setVerticalScrollBarEnabled(false);
177
      //mText.setText(act.getString(R.string.no_updates));
178

  
179
      int imagH = (int)(mSize*0.52f);
180
      int textH = (int)(mSize*0.20f);
181
      int buttH = (int)(mSize*0.35f);
176
      int imagH = (int)(mSize*1.00f);
177
      int textH = (int)(mSize*0.23f);
178
      int buttH = (int)(mSize*0.49f);
182 179

  
183 180
      LinearLayout.LayoutParams pI = new LinearLayout.LayoutParams( imagH,imagH );
184
      pI.setMargins(mMargin/2, mMargin/2, mMargin/2, mMargin/2 );
185 181
      LinearLayout.LayoutParams pV = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, mSize );
186 182
      pV.setMargins(mMargin, mMargin, mMargin, 0);
187 183
      LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, textH );
src/main/res/layout/dialog_updates_pane.xml
27 27
    		android:layout_width="match_parent"
28 28
    		android:layout_height="wrap_content"
29 29
    		android:textStyle="bold"/>
30
   		<TextView
31
    		android:id="@+id/updates_pane_version"
32
    		android:gravity="center_vertical"
33
    		android:layout_width="wrap_content"
34
    		android:layout_height="wrap_content"/>
35 30

  
36 31
        <TextView
37 32
    		android:id="@+id/updates_pane_description"

Also available in: Unified diff