14
14
import java .util .Arrays ;
15
15
import java .util .HashMap ;
16
16
17
+ import android .app .Activity ;
17
18
import android .app .AlertDialog ;
18
19
import android .content .Context ;
19
20
import android .content .DialogInterface ;
42
43
import android .preference .Preference .OnPreferenceClickListener ;
43
44
import android .text .TextUtils ;
44
45
import android .view .View ;
46
+ import android .widget .Button ;
45
47
import android .widget .EditText ;
46
48
import android .widget .SeekBar ;
47
49
import android .widget .TextView ;
@@ -2226,7 +2228,7 @@ protected void onPause() {
2226
2228
mPs .getSharedPreferences ().unregisterOnSharedPreferenceChangeListener (this );
2227
2229
}
2228
2230
2229
- public static void showChangeLog (final Context context ,boolean changelog )
2231
+ public static void showChangeLog (final Activity context ,boolean changelog )
2230
2232
{
2231
2233
int filename ;
2232
2234
int title ;
@@ -2252,8 +2254,27 @@ public static void showChangeLog(final Context context,boolean changelog)
2252
2254
e .printStackTrace ();
2253
2255
}
2254
2256
2257
+ View view = context .getLayoutInflater ().inflate (R .layout .history_view , null );
2258
+
2259
+ TextView msgText = (TextView )view .findViewById (R .id .message );
2260
+ msgText .setText ( text );
2261
+
2262
+ Button banner = (Button )view .findViewById (R .id .banner );
2263
+ banner .setOnClickListener (new View .OnClickListener () {
2264
+
2265
+ @ Override
2266
+ public void onClick (View v ) {
2267
+ Intent intent = new Intent (Intent .ACTION_VIEW ,Uri .parse ("market://details?id=jp.sblo.pandora.jota.plus" ));
2268
+ // Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("https://sites.google.com/site/aquamarinepandora/jotaplus"));
2269
+ try {
2270
+ context .startActivity (intent );
2271
+ }
2272
+ catch (Exception e ){}
2273
+ }
2274
+ });
2275
+
2255
2276
AlertDialog .Builder builder = new AlertDialog .Builder (context )
2256
- .setMessage ( text )
2277
+ .setView ( view )
2257
2278
.setTitle ( title )
2258
2279
.setPositiveButton (R .string .label_ok , null );
2259
2280
@@ -2270,7 +2291,7 @@ public void onClick(DialogInterface dialog, int which) {
2270
2291
builder .show ();
2271
2292
}
2272
2293
2273
- public static void showWelcomeMessage (Context context )
2294
+ public static void showWelcomeMessage (Activity context )
2274
2295
{
2275
2296
if ( sLastVersion == -1 ){
2276
2297
// Do nothing
0 commit comments