Page 657 - 2
P. 657

TextView tv_WeatherInfo;


                ForeCastManager mForeCast;


                String lon = "126.652172"; //  좌표 설정
                String lat = "37.475157"; //  좌표 설정
                MainActivity mThis;
                ArrayList<ContentValues> mWeatherData;
                ArrayList<WeatherInfo> mWeatherInfomation;


                @Override    protected void onCreate(Bundle savedInstanceState) {
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_main);
                    Initialize();
                }


                public void Initialize()
                {
                    tv_WeatherInfo = (TextView)findViewById(R.id.tv_WeatherInfo);
                    mWeatherInfomation = new ArrayList<>();
                    mThis = this;
                    mForeCast = new ForeCastManager(lon,lat,mThis);
                    mForeCast.run();
                }


                public String PrintValue()
                {
                    String mData = "";
                    for(int i = 0; i < mWeatherInfomation.size(); i ++)
                    {
                        mData = mData + mWeatherInfomation.get(i).getWeather_Day() + "\r\n"
                                + mWeatherInfomation.get(i).getWeather_Name() + "\r\n"
                                + mWeatherInfomation.get(i).getClouds_Sort()
                                + " /Cloud amount: " + mWeatherInfomation.get(i).getClouds_Value()
                                + mWeatherInfomation.get(i).getClouds_Per() +"\r\n"
                                + mWeatherInfomation.get(i).getWind_Name()
                                +   " /WindSpeed: " + mWeatherInfomation.get(i).getWind_Speed() + " mps"
            + "\r\n"
                                + "Max: " + mWeatherInfomation.get(i).getTemp_Max() + " "℃
                                + " /Min: " + mWeatherInfomation.get(i).getTemp_Min() + " " +"\r\n"℃
                                + "Humidity: " + mWeatherInfomation.get(i).getHumidity() + "%";


                        mData = mData + "\r\n" + "-------------------------------------------
            ---" + "\r\n";
                    }


                                                         - 657 -
   652   653   654   655   656   657   658   659   660   661   662