import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Date;
import view.XListView;
public class XListVeiwActivity extends Activity {
TextView mtv_classname,mcustom_title;
XListView mXListView;
String mtit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_xlist_veiw);
initView();
initData();
TextView mtv_classname,mcustom_title;
XListView mXListView;
String mtit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_xlist_veiw);
initView();
initData();
}
//初始化
// @RequiresApi(api = Build.VERSION_CODES.N)
private void initView(){
mtv_classname= (TextView)findViewById(R.id.xlistview_tv_classname);
mXListView = (XListView) findViewById(R.id.xlistview_xls);
mXListView.setPullLoadEnable(true);// 设置上拉加载
mXListView.setPullRefreshEnable(true);//设置下拉刷新
SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
Date curDate = new Date(System.currentTimeMillis());//获取当前时间
String str = formatter.format(curDate);
mXListView.setRefreshTime(str);
}
//初始化数据
private void initData(){
//获取传递过来的参数
String mClassname= getIntent().getStringExtra("classname");
if(mClassname!=null){
// mtv_classname.setText("我的"+mClassname+mtit);
}
//在此在此获取接口中的数据
MyAsyncTask myHttpTools=new MyAsyncTask(XListVeiwActivity.this,Url.mPath,"GET",mXListView);
myHttpTools.execute();
//初始化数据
private void initData(){
//获取传递过来的参数
String mClassname= getIntent().getStringExtra("classname");
if(mClassname!=null){
// mtv_classname.setText("我的"+mClassname+mtit);
}
//在此在此获取接口中的数据
MyAsyncTask myHttpTools=new MyAsyncTask(XListVeiwActivity.this,Url.mPath,"GET",mXListView);
myHttpTools.execute();
}
}