Project

General

Profile

« Previous | Next » 

Revision 2a2ca758

Added by Leszek Koltunski over 2 years ago

Downloading updates: dialog progress.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogUpdates.java
25 25
import android.util.DisplayMetrics;
26 26
import android.util.TypedValue;
27 27
import android.view.LayoutInflater;
28
import android.view.View;
28 29
import android.view.Window;
29 30
import android.widget.Button;
30 31
import android.widget.TextView;
......
43 44

  
44 45
public class RubikDialogUpdates extends AppCompatDialogFragment implements RubikNetwork.Updatee
45 46
  {
47
  private View createView(LayoutInflater inflater)
48
    {
49
    final View view = inflater.inflate(R.layout.dialog_updates, null);
50

  
51
    TextView text = view.findViewById(R.id.about_version);
52
    text.setTextSize(TypedValue.COMPLEX_UNIT_PX, 50);
53
    text.setText("ggggg ruyujk j k");
54

  
55
    return view;
56
    }
57

  
58
///////////////////////////////////////////////////////////////////////////////////////////////////
59

  
46 60
  @NonNull
47 61
  @Override
48 62
  public Dialog onCreateDialog(Bundle savedInstanceState)
......
71 85
        }
72 86
      });
73 87

  
88
    View view = createView(inflater);
89
    builder.setView(view);
90

  
74 91
    Dialog dialog = builder.create();
75 92
    dialog.setCanceledOnTouchOutside(false);
76 93
    Window window = dialog.getWindow();
src/main/res/layout/dialog_updates.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent">
5

  
6
    <LinearLayout
7
        android:id="@+id/updates_main_layout"
8
        android:layout_width="fill_parent"
9
        android:layout_height="wrap_content"
10
        android:gravity="center|fill_horizontal"
11
        android:layout_marginLeft="10dp"
12
        android:layout_marginRight="10dp"
13
        android:layout_marginTop="0dp"
14
        android:background="@color/black"
15
        android:orientation="vertical">
16

  
17

  
18
        <TextView
19
            android:id="@+id/about_version"
20
            android:layout_width="match_parent"
21
            android:layout_height="fill_parent"
22
            android:layout_weight="0.40"
23
            android:layout_marginTop="10dp"
24
            android:layout_marginLeft="10dp"
25
            android:layout_marginRight="10dp"
26
            android:layout_marginBottom="10dp"/>
27

  
28
    </LinearLayout>
29

  
30
</ScrollView>

Also available in: Unified diff