<commit_before>package cn.ecailan.esy.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;

import org.json.JSONObject;
import org.ry8.CeaFrame.model.BusinessResponse;
import org.ry8.CeaFrame.theme.ResourcesFactory;
import org.ry8.CeaFrame.view.ToastView;
import org.ry8.external.androidquery.callback.AjaxStatus;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import cn.ecailan.esy.R;
import cn.ecailan.esy.adapter.PlantAdapter;
import cn.ecailan.esy.model.SendMsgRequest;

/**
 * Created by John on 2015/9/2.
 * 现有种植清单
 * 主界面
 */
public class PlantMainActivity extends Activity implements BusinessResponse,View.OnClickListener {

    private TextView title;//标题
    private FrameLayout nav_bar;
    private LinearLayout backUpPage;
    private SharedPreferences shared;
    private ListView mListView;
    private Button btnAdd;//新增
    private Button btnPurchase;//采收
    private Button btnManagement;//管理
    private SendMsgRequest sendMsgRequest;
    private PlantAdapter plantAdapter;
    private ImageView rightButton;
    private LinearLayout linearlayout_parent;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        shared = this.getSharedPreferences("userInfo", 0);

        int s = shared.getInt("usertypeid", -1);
        Intent intent = new Intent();
        if (s == 0) {

        }else if(s == 1){

        }else if(s == 2){
            intent.setClass(this,BoyuanConntrolActivity.class);
            startActivity(intent);
            finish();
        }else{
            intent.setClass(this, lg_SigninActivity.class);
            startActivity(intent);
            finish();
        }

        setContentView(R.layout.plant_main_layout);

        //标题<commit_msg>test2<commit_after>package cn.ecailan.esy.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;

import org.json.JSONObject;
import org.ry8.CeaFrame.model.BusinessResponse;
import org.ry8.CeaFrame.theme.ResourcesFactory;
import org.ry8.CeaFrame.view.ToastView;
import org.ry8.external.androidquery.callback.AjaxStatus;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import cn.ecailan.esy.R;
import cn.ecailan.esy.adapter.PlantAdapter;
import cn.ecailan.esy.model.SendMsgRequest;

/**
 * Created by John on 2015/9/2.
 * 现有种植清单
 * 主界面
 */
public class PlantMainActivity extends Activity implements BusinessResponse,View.OnClickListener {

    private TextView title;//标题
    private FrameLayout nav_bar;
    private LinearLayout backUpPage;
    private SharedPreferences shared;
    private ListView mListView;
    private Button btnAdd;//新增
    private Button btnPurchase;//采收
    private Button btnManagement;//管理
    private SendMsgRequest sendMsgRequest;
    private PlantAdapter plantAdapter;
    private ImageView rightButton;
    private LinearLayout linearlayout_parent;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        shared = this.getSharedPreferences("userInfo", 0);


        
        int s = shared.getInt("usertypeid", -1);
        Intent intent = new Intent();
        if (s == 0) {

        }else if(s == 1){

        }else if(s == 2){
            intent.setClass(this,BoyuanConntrolActivity.class);
            startActivity(intent);
            finish();
        }else{
            intent.setClass(this, lg_SigninActivity.class);
            startActivity(intent);
            finish();
        }

        setContentView(R.layout.plant_main_layout);

        //标题
{'fraction_non_alphanumeric': 0.09566639411283728, 'fraction_numerical': 0.006336876533115291, 'mean_word_length': 3.745877788554801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5622762', 'n_tokens_mistral': 1467, 'n_tokens_neox': 1411, 'n_words': 303}