XyApp/src/com/dy/LxhViewActivity.java

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.dy;

import java.net.URLDecoder;
import java.net.URLEncoder;

import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts;
import android.provider.Contacts.People;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TextView;
import android.widget.Toast;

import com.dy.Declare;
import com.dy.HttpUtil;

public class LxhViewActivity extends Activity {

	// 专业,班级,姓名,职务,手机,短号,qq,email
	
	private TextView title, times, descs,htitle,moneys,tel;
	private String id;

	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.infoviewlxh);
		Bundle extras = this.getIntent().getExtras();
		id = extras.getString("id");
		System.out.println("!!!!!!!!!!!!!!  "+id);
		htitle = (TextView) findViewById(R.id.textViewtitle);

		title = (TextView) findViewById(R.id.title);
		times = (TextView) findViewById(R.id.times);
		descs = (TextView) findViewById(R.id.descs);
		moneys = (TextView) findViewById(R.id.moneys);
		tel = (TextView) findViewById(R.id.tel);
		htitle.setText("信息详细");
		getData();

	}

	private void getData() {
		try {
			String url = HttpUtil.BASE_URL + "QLxhInfoServlet?id=" + id;
			// 查询返回结果
			String result = HttpUtil.queryStringForPost(url);
			result = URLDecoder.decode(result, "UTF-8");

			if (!result.equals("0")) {// 这里是如果返回结果不为0 则表示可以登入
				// 登入后要记录一下登入者的id,用户名
				String[] results = result.split("@");
				title.setText(results[1]);
				descs.setText(results[2]);
后面还有 65 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。