mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-27 13:28:42 +00:00
47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
package org.mozilla.goanna.firstrun;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import org.mozilla.goanna.R;
|
|
import org.mozilla.goanna.Telemetry;
|
|
import org.mozilla.goanna.TelemetryContract;
|
|
import org.mozilla.goanna.fxa.activities.FxAccountGetStartedActivity;
|
|
|
|
public class WelcomePanel extends FirstrunPanel {
|
|
public static final int TITLE_RES = R.string.firstrun_welcome_message;
|
|
|
|
@Override
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) {
|
|
final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.firstrun_welcome_fragment, container, false);
|
|
root.findViewById(R.id.welcome_account).setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View v) {
|
|
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, "firstrun-sync");
|
|
|
|
final Intent accountIntent = new Intent(getActivity(), FxAccountGetStartedActivity.class);
|
|
startActivity(accountIntent);
|
|
|
|
close();
|
|
}
|
|
});
|
|
|
|
root.findViewById(R.id.welcome_browse).setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View v) {
|
|
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, "firstrun-browser");
|
|
close();
|
|
}
|
|
});
|
|
|
|
return root;
|
|
}
|
|
}
|