1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2023 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.dialogs;
|
11
|
|
12
|
import android.view.View;
|
13
|
import android.widget.LinearLayout;
|
14
|
import android.widget.TextView;
|
15
|
|
16
|
import org.distorted.main.R;
|
17
|
import org.distorted.main.RubikActivity;
|
18
|
|
19
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
20
|
|
21
|
public class RubikDialogWhatsNewView
|
22
|
{
|
23
|
private final View mView;
|
24
|
|
25
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
26
|
|
27
|
public RubikDialogWhatsNewView(final RubikActivity act, String version, String message, int padding, boolean isCurrent,
|
28
|
LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pTitle, LinearLayout.LayoutParams pMessage )
|
29
|
{
|
30
|
mView = act.getLayoutInflater().inflate(R.layout.dialog_whatsnew_pane, null);
|
31
|
mView.setLayoutParams(pView);
|
32
|
mView.setPadding(padding,padding,padding,padding);
|
33
|
|
34
|
TextView titleView = mView.findViewById(R.id.whatsnew_pane_title);
|
35
|
titleView.setText( isCurrent ? act.getString(R.string.tv_placeholder,version) : version );
|
36
|
titleView.setLayoutParams(pTitle);
|
37
|
|
38
|
TextView messView = mView.findViewById(R.id.whatsnew_pane_message);
|
39
|
messView.setText(message);
|
40
|
messView.setLayoutParams(pMessage);
|
41
|
}
|
42
|
|
43
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
44
|
|
45
|
public View getView()
|
46
|
{
|
47
|
return mView;
|
48
|
}
|
49
|
}
|