Android Open Source - PinterestLikeApp Welcome Activity






From Project

Back to project page PinterestLikeApp.

License

The source code is released under:

MIT License

If you think the Android project PinterestLikeApp 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.dreamtale.pintrestlike.activity;
// w  w  w  .  j a v  a 2 s .  c  o  m
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.dreamtale.pintrestlike.R;
import com.dreamtale.pintrestlike.utils.UIConfig;

public class WelcomeActivity extends Activity
{
    private Button button1;
    private Button button2;
    
    private View.OnClickListener choiceListener = new View.OnClickListener()
    {
        @Override
        public void onClick(View v)
        {
            switch (v.getId())
            {
            case R.id.gridstyle:
                UIConfig.getInstance().setMode(UIConfig.MODE_GRID_VIEW);
                break;
                
            case R.id.pintersetstyle:
                UIConfig.getInstance().setMode(UIConfig.MODE_PINTEREST_VIEW);
                break;
            default:
                break;
            }
            Intent intent = new Intent();
            intent.setClass(WelcomeActivity.this, MainActivity.class);
            startActivity(intent);
        }
    };
    
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welcome);
        initlizeViews();
    }
    
    private void initlizeViews()
    {
        button1 = (Button)findViewById(R.id.gridstyle);
        button2 = (Button)findViewById(R.id.pintersetstyle);
        
        button1.setOnClickListener(choiceListener);
        button2.setOnClickListener(choiceListener);
    }
}




Java Source Code List

com.dreamtale.pintrestlike.activity.BluetoothDeviceListActivity.java
com.dreamtale.pintrestlike.activity.DetailActivity.java
com.dreamtale.pintrestlike.activity.MainActivity.java
com.dreamtale.pintrestlike.activity.WelcomeActivity.java
com.dreamtale.pintrestlike.data.ImageAdapter.java
com.dreamtale.pintrestlike.data.ImageInfoProvider.java
com.dreamtale.pintrestlike.data.ImageInfo.java
com.dreamtale.pintrestlike.fragment.ImageDetailFragment.java
com.dreamtale.pintrestlike.parser.ImageParser.java
com.dreamtale.pintrestlike.share.BluetoothService.java
com.dreamtale.pintrestlike.utils.CacheManager.java
com.dreamtale.pintrestlike.utils.ImageDownloader.java
com.dreamtale.pintrestlike.utils.ImageUtils.java
com.dreamtale.pintrestlike.utils.IntentConstant.java
com.dreamtale.pintrestlike.utils.UIConfig.java
com.dreamtale.pintrestlike.widget.BluetoothDeviceListDialog.java
com.dreamtale.pintrestlike.widget.ItemView.java
com.dreamtale.pintrestlike.widget.PinterestScrollView.java
com.dreamtale.pintrestlike.widget.PintrestGridView.java