Android Open Source - android-google-engine-app-example Intro Third Fragment






From Project

Back to project page android-google-engine-app-example.

License

The source code is released under:

Apache License

If you think the Android project android-google-engine-app-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.google.cloud.backend.sample.guestbook;
/*from  ww w .  ja v a  2s.  com*/
import com.google.cloud.backend.R;

import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;

/**
 * This Fragment shows the third screen of the Guestbook introduction.
 */
public class IntroThirdFragment extends Fragment implements OnClickListener {

    public static final String TAG = "THIRD";

    private OnIntroNavListener mCallback;
    private ImageView mPrevBtn;
    private ImageView mDoneBtn;
    private CheckBox mCheckbox;

    private boolean mSkipIntro = false;

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        // Set the callback activity to use
        try {
            mCallback = (OnIntroNavListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(
                    activity.toString() + " must implement OnIntroNavListener");
        }
    }

    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_intro_third, container, false);

        mPrevBtn = (ImageView) v.findViewById(R.id.intro_3_prev_btn);
        mPrevBtn.setOnClickListener(this);
        mDoneBtn = (ImageView) v.findViewById(R.id.intro_done);
        mDoneBtn.setOnClickListener(this);
        mCheckbox = (CheckBox) v.findViewById(R.id.checkbox);
        mCheckbox.setOnClickListener(this);

        return v;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.intro_3_prev_btn:
                mCallback.toSecond(TAG);
                break;
            case R.id.intro_done:
                mCallback.done(mSkipIntro);
                break;
            case R.id.checkbox:
                mSkipIntro = mCheckbox.isChecked();
                break;
        }
    }

}




Java Source Code List

com.google.cloud.backend.GCMBroadcastReceiver.java
com.google.cloud.backend.GCMIntentService.java
com.google.cloud.backend.android.mobilebackend.MobilebackendRequestInitializer.java
com.google.cloud.backend.android.mobilebackend.MobilebackendRequest.java
com.google.cloud.backend.android.mobilebackend.Mobilebackend.java
com.google.cloud.backend.android.mobilebackend.model.BlobAccess.java
com.google.cloud.backend.android.mobilebackend.model.EntityDto.java
com.google.cloud.backend.android.mobilebackend.model.EntityListDto.java
com.google.cloud.backend.android.mobilebackend.model.FilterDto.java
com.google.cloud.backend.android.mobilebackend.model.Filter.java
com.google.cloud.backend.android.mobilebackend.model.QueryDto.java
com.google.cloud.backend.core.CloudBackendAsync.java
com.google.cloud.backend.core.CloudBackendFragment.java
com.google.cloud.backend.core.CloudBackendMessaging.java
com.google.cloud.backend.core.CloudBackend.java
com.google.cloud.backend.core.CloudCallbackHandler.java
com.google.cloud.backend.core.CloudEndpointUtils.java
com.google.cloud.backend.core.CloudEntity.java
com.google.cloud.backend.core.CloudQuery.java
com.google.cloud.backend.core.Consts.java
com.google.cloud.backend.core.Filter.java
com.google.cloud.backend.sample.guestbook.GuestbookActivity.java
com.google.cloud.backend.sample.guestbook.IntroFirstFragment.java
com.google.cloud.backend.sample.guestbook.IntroSecondFragment.java
com.google.cloud.backend.sample.guestbook.IntroThirdFragment.java
com.google.cloud.backend.sample.guestbook.IntroductionActivity.java
com.google.cloud.backend.sample.guestbook.OnIntroNavListener.java
com.google.cloud.backend.sample.guestbook.PostAdapter.java
com.google.cloud.backend.sample.guestbook.SplashFragment.java