|
|
|
@ -12,6 +12,9 @@ import android.content.Intent;
|
|
|
|
|
import android.content.pm.ApplicationInfo;
|
|
|
|
|
import android.content.pm.PackageManager;
|
|
|
|
|
import android.net.Uri;
|
|
|
|
|
import android.view.Gravity;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.widget.Button;
|
|
|
|
|
import android.widget.ImageView;
|
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
|
import android.widget.TextView;
|
|
|
|
@ -66,24 +69,30 @@ public class AddonService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Displays power pack help */
|
|
|
|
|
public static void displayPowerPackHelp(Activity activity) {
|
|
|
|
|
public static LinearLayout displayPowerPackHelp(final Activity activity) {
|
|
|
|
|
LinearLayout layout = new LinearLayout(activity);
|
|
|
|
|
layout.setOrientation(LinearLayout.HORIZONTAL);
|
|
|
|
|
layout.setOrientation(LinearLayout.VERTICAL);
|
|
|
|
|
ImageView imageView = new ImageView(activity);
|
|
|
|
|
imageView.setImageResource(R.drawable.icon_pp);
|
|
|
|
|
layout.addView(imageView);
|
|
|
|
|
|
|
|
|
|
TextView textView = new TextView(activity);
|
|
|
|
|
textView.setText(R.string.DLG_power_pack);
|
|
|
|
|
textView.setTextSize(16);
|
|
|
|
|
textView.setGravity(Gravity.CENTER);
|
|
|
|
|
layout.addView(textView);
|
|
|
|
|
|
|
|
|
|
new AlertDialog.Builder(activity)
|
|
|
|
|
.setTitle(POWER_PACK_LABEL)
|
|
|
|
|
.setView(layout)
|
|
|
|
|
.setIcon(android.R.drawable.ic_dialog_info)
|
|
|
|
|
.setPositiveButton(R.string.DLG_to_market, new MarketClickListener(activity,
|
|
|
|
|
POWER_PACK_PACKAGE))
|
|
|
|
|
.show();
|
|
|
|
|
Button button = new Button(activity);
|
|
|
|
|
button.setText(R.string.DLG_to_market);
|
|
|
|
|
button.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
new MarketClickListener(activity, POWER_PACK_PACKAGE);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
layout.addView(button);
|
|
|
|
|
|
|
|
|
|
return layout;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|