android webservice获取城市天气情况

Weather.java

  1. package com.example;
  2. import java.io.UnsupportedEncodingException;
  3. import org.ksoap2.SoapEnvelope;
  4. import org.ksoap2.serialization.SoapObject;
  5. import org.ksoap2.serialization.SoapSerializationEnvelope;
  6. import org.ksoap2.transport.HttpTransportSE;
  7. import android.app.Activity;
  8. import android.os.Bundle;
  9. import android.view.View;
  10. import android.view.View.OnClickListener;
  11. import android.widget.Button;
  12. import android.widget.EditText;
  13. import android.widget.ImageView;
  14. import android.widget.TextView;
  15. public class Weatherextends Activity {
  16. private Button search_but;
  17. private TextView textview1;
  18. private EditText et;
  19. private Button city1_1;
  20. private Button city1_2;
  21. private Button city1_3;
  22. private Button city1_4;
  23. private ImageView image1;
  24. private ImageView image2;
  25. /** Called when the activity is first created. */
  26. @Override
  27. public void onCreate(Bundle savedInstanceState) {
  28. super.onCreate(savedInstanceState);
  29. setContentView(R.layout.main);
  30. et=(EditText)findViewById(R.id.et);
  31. image1=(ImageView)findViewById(R.id.image1);
  32. image2=(ImageView)findViewById(R.id.image2);
  33. search_but=(Button)findViewById(R.id.search_but);
  34. city1_1=(Button)findViewById(R.id.city1_1);
  35. city1_1.setOnClickListener(listener1);
  36. city1_2=(Button)findViewById(R.id.city1_2);
  37. city1_2.setOnClickListener(listener2);
  38. city1_3=(Button)findViewById(R.id.city1_3);
  39. city1_3.setOnClickListener(listener3);
  40. city1_4=(Button)findViewById(R.id.city1_4);
  41. city1_4.setOnClickListener(listener4);
  42. search_but.setOnClickListener(listener);
  43. }
  44. private OnClickListener listener=new OnClickListener() {
  45. @Override
  46. public void onClick(View v) {
  47. String city=et.getText().toString();
  48. getWeather(city);
  49. }
  50. };
  51. private OnClickListener listener1=new OnClickListener() {
  52. @Override
  53. public void onClick(View v) {
  54. et.setText("北京");
  55. }
  56. };
  57. private OnClickListener listener2=new OnClickListener() {
  58. @Override
  59. public void onClick(View v) {
  60. et.setText("上海");
  61. }
  62. };
  63. private OnClickListener listener3=new OnClickListener() {
  64. @Override
  65. public void onClick(View v) {
  66. et.setText("深圳");
  67. }
  68. };
  69. private OnClickListener listener4=new OnClickListener() {
  70. @Override
  71. public void onClick(View v) {
  72. et.setText("北京");
  73. }
  74. };
  75. private static final String NAMESPACE = "http://WebXml.com.cn/";
  76. // WebService地址
  77. private static String URL ="http://www.webxml.com.cn/webservices/weatherwebservice.asmx";
  78. private staticfinal String METHOD_NAME = "getWeatherbyCityName";
  79. private static String SOAP_ACTION ="http://WebXml.com.cn/getWeatherbyCityName";
  80. private String weatherToday;
  81. private SoapObject detail;
  82. private String weatherNow;
  83. private String weatherWillBe;
  84. private void setIcon(String weather, ImageView imageview) {
  85. if(weather.equalsIgnoreCase("nothing.gif"))
  86. imageview.setBackgroundResource(R.drawable.a_nothing);
  87. if(weather.equalsIgnoreCase("0.gif"))
  88. imageview.setBackgroundResource(R.drawable.a_0);
  89. if(weather.equalsIgnoreCase("1.gif"))
  90. imageview.setBackgroundResource(R.drawable.a_1);
  91. if(weather.equalsIgnoreCase("2.gif"))
  92. imageview.setBackgroundResource(R.drawable.a_2);
  93. if(weather.equalsIgnoreCase("3.gif"))
  94. imageview.setBackgroundResource(R.drawable.a_3);
  95. if(weather.equalsIgnoreCase("4.gif"))
  96. imageview.setBackgroundResource(R.drawable.a_4);
  97. if(weather.equalsIgnoreCase("5.gif"))
  98. imageview.setBackgroundResource(R.drawable.a_5);
  99. if(weather.equalsIgnoreCase("6.gif"))
  100. imageview.setBackgroundResource(R.drawable.a_6);
  101. if(weather.equalsIgnoreCase("7.gif"))
  102. imageview.setBackgroundResource(R.drawable.a_7);
  103. if(weather.equalsIgnoreCase("8.gif"))
  104. imageview.setBackgroundResource(R.drawable.a_8);
  105. if(weather.equalsIgnoreCase("9.gif"))
  106. imageview.setBackgroundResource(R.drawable.a_9);
  107. if(weather.equalsIgnoreCase("10.gif"))
  108. imageview.setBackgroundResource(R.drawable.a_10);
  109. if(weather.equalsIgnoreCase("11.gif"))
  110. imageview.setBackgroundResource(R.drawable.a_11);
  111. if(weather.equalsIgnoreCase("12.gif"))
  112. imageview.setBackgroundResource(R.drawable.a_12);
  113. if(weather.equalsIgnoreCase("13.gif"))
  114. imageview.setBackgroundResource(R.drawable.a_13);
  115. if(weather.equalsIgnoreCase("14.gif"))
  116. imageview.setBackgroundResource(R.drawable.a_14);
  117. if(weather.equalsIgnoreCase("15.gif"))
  118. imageview.setBackgroundResource(R.drawable.a_15);
  119. if(weather.equalsIgnoreCase("16.gif"))
  120. imageview.setBackgroundResource(R.drawable.a_16);
  121. if(weather.equalsIgnoreCase("17.gif"))
  122. imageview.setBackgroundResource(R.drawable.a_17);
  123. if(weather.equalsIgnoreCase("18.gif"))
  124. imageview.setBackgroundResource(R.drawable.a_18);
  125. if(weather.equalsIgnoreCase("19.gif"))
  126. imageview.setBackgroundResource(R.drawable.a_19);
  127. if(weather.equalsIgnoreCase("20.gif"))
  128. imageview.setBackgroundResource(R.drawable.a_20);
  129. if(weather.equalsIgnoreCase("21.gif"))
  130. imageview.setBackgroundResource(R.drawable.a_21);
  131. if(weather.equalsIgnoreCase("22.gif"))
  132. imageview.setBackgroundResource(R.drawable.a_22);
  133. if(weather.equalsIgnoreCase("23.gif"))
  134. imageview.setBackgroundResource(R.drawable.a_23);
  135. if(weather.equalsIgnoreCase("24.gif"))
  136. imageview.setBackgroundResource(R.drawable.a_24);
  137. if(weather.equalsIgnoreCase("25.gif"))
  138. imageview.setBackgroundResource(R.drawable.a_25);
  139. if(weather.equalsIgnoreCase("26.gif"))
  140. imageview.setBackgroundResource(R.drawable.a_26);
  141. if(weather.equalsIgnoreCase("27.gif"))
  142. imageview.setBackgroundResource(R.drawable.a_27);
  143. if(weather.equalsIgnoreCase("28.gif"))
  144. imageview.setBackgroundResource(R.drawable.a_28);
  145. if(weather.equalsIgnoreCase("29.gif"))
  146. imageview.setBackgroundResource(R.drawable.a_29);
  147. if(weather.equalsIgnoreCase("30.gif"))
  148. imageview.setBackgroundResource(R.drawable.a_30);
  149. if(weather.equalsIgnoreCase("31.gif"))
  150. imageview.setBackgroundResource(R.drawable.a_31);
  151. }
  152. public void getWeather(String cityName) {
  153. try {
  154. textview1 = (TextView) this.findViewById(R.id.TextView01);
  155. SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
  156. rpc.addProperty("theCityName", cityName);
  157. SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
  158. SoapEnvelope.VER11);
  159. envelope.bodyOut = rpc;
  160. envelope.dotNet = true;
  161. envelope.setOutputSoapObject(rpc);
  162. HttpTransportSE ht = new HttpTransportSE(URL);
  163. ht.debug = true;
  164. ht.call(SOAP_ACTION, envelope);
  165. detail = (SoapObject) envelope.getResponse();
  166. parseWeather(detail);
  167. return;
  168. } catch (Exception e) {
  169. e.printStackTrace();
  170. }
  171. }
  172. private void parseWeather(SoapObject detail)
  173. throws UnsupportedEncodingException {
  174. textview1 = (TextView) this.findViewById(R.id.TextView01);
  175. String date = detail.getProperty(6).toString();
  176. weatherToday = "\n天气:" + date.split(" ")[1];
  177. weatherToday = weatherToday + "\n气温:"
  178. + detail.getProperty(5).toString();
  179. weatherToday = weatherToday + "\n风力:"
  180. + detail.getProperty(7).toString() + "\n";
  181. weatherNow = detail.getProperty(8).toString();
  182. weatherWillBe = detail.getProperty(9).toString();
  183. textview1.setText(et.getText() + weatherToday);
  184. setIcon(weatherNow, image1);
  185. setIcon(weatherWillBe, image2);
  186. }
  187. }
package com.example;

import java.io.UnsupportedEncodingException;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;

import org.ksoap2.transport.HttpTransportSE;


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

public class Weather extends Activity {



	 private Button search_but;
	 private TextView textview1;
	 private EditText et;
	 private Button city1_1;
	 private Button city1_2;
	 private Button city1_3;
	 private Button city1_4;
	 private ImageView image1;
	 private ImageView image2;
	 /** Called when the activity is first created. */
	 @Override
	 public void onCreate(Bundle savedInstanceState) {
	  super.onCreate(savedInstanceState);
	  setContentView(R.layout.main);

	 et=(EditText)findViewById(R.id.et);
	 image1=(ImageView)findViewById(R.id.image1);
	 image2=(ImageView)findViewById(R.id.image2);
	 search_but=(Button)findViewById(R.id.search_but);
	 city1_1=(Button)findViewById(R.id.city1_1);
	 city1_1.setOnClickListener(listener1);
	 city1_2=(Button)findViewById(R.id.city1_2);
	 city1_2.setOnClickListener(listener2);
	 city1_3=(Button)findViewById(R.id.city1_3);
	 city1_3.setOnClickListener(listener3);
	 city1_4=(Button)findViewById(R.id.city1_4);
	 city1_4.setOnClickListener(listener4);
	 search_but.setOnClickListener(listener);
	 }
	 private OnClickListener listener=new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			String city=et.getText().toString();
			getWeather(city);
		}
	}; 
	private OnClickListener listener1=new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			et.setText("北京");
		}
	};
	private OnClickListener listener2=new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			et.setText("上海");
		}
	};
	private OnClickListener listener3=new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			et.setText("深圳");
		}
	};
	private OnClickListener listener4=new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			et.setText("北京");
		}
	};
	

	 private static final String NAMESPACE = "http://WebXml.com.cn/";

	 // WebService地址
	 private static String URL = "http://www.webxml.com.cn/webservices/weatherwebservice.asmx";

	 private static final String METHOD_NAME = "getWeatherbyCityName";

	 private static String SOAP_ACTION = "http://WebXml.com.cn/getWeatherbyCityName";

	 private String weatherToday;

	 private SoapObject detail;

	 private String weatherNow;
	 
	 private String weatherWillBe;
	 
	 private void setIcon(String weather, ImageView imageview) {
			if(weather.equalsIgnoreCase("nothing.gif"))
				imageview.setBackgroundResource(R.drawable.a_nothing);
			if(weather.equalsIgnoreCase("0.gif"))
				imageview.setBackgroundResource(R.drawable.a_0);
			if(weather.equalsIgnoreCase("1.gif"))
				imageview.setBackgroundResource(R.drawable.a_1);
			if(weather.equalsIgnoreCase("2.gif"))
				imageview.setBackgroundResource(R.drawable.a_2);
			if(weather.equalsIgnoreCase("3.gif"))
				imageview.setBackgroundResource(R.drawable.a_3);		
			if(weather.equalsIgnoreCase("4.gif"))
				imageview.setBackgroundResource(R.drawable.a_4);
			if(weather.equalsIgnoreCase("5.gif"))
				imageview.setBackgroundResource(R.drawable.a_5);
			if(weather.equalsIgnoreCase("6.gif"))
				imageview.setBackgroundResource(R.drawable.a_6);
			if(weather.equalsIgnoreCase("7.gif"))
				imageview.setBackgroundResource(R.drawable.a_7);
			if(weather.equalsIgnoreCase("8.gif"))
				imageview.setBackgroundResource(R.drawable.a_8);
			if(weather.equalsIgnoreCase("9.gif"))
				imageview.setBackgroundResource(R.drawable.a_9);
			if(weather.equalsIgnoreCase("10.gif"))
				imageview.setBackgroundResource(R.drawable.a_10);			
			if(weather.equalsIgnoreCase("11.gif"))
				imageview.setBackgroundResource(R.drawable.a_11);
			if(weather.equalsIgnoreCase("12.gif"))
				imageview.setBackgroundResource(R.drawable.a_12);
			if(weather.equalsIgnoreCase("13.gif"))
				imageview.setBackgroundResource(R.drawable.a_13);
			if(weather.equalsIgnoreCase("14.gif"))
				imageview.setBackgroundResource(R.drawable.a_14);
			if(weather.equalsIgnoreCase("15.gif"))
				imageview.setBackgroundResource(R.drawable.a_15);
			if(weather.equalsIgnoreCase("16.gif"))
				imageview.setBackgroundResource(R.drawable.a_16);
			if(weather.equalsIgnoreCase("17.gif"))
				imageview.setBackgroundResource(R.drawable.a_17);
			if(weather.equalsIgnoreCase("18.gif"))
				imageview.setBackgroundResource(R.drawable.a_18);
			if(weather.equalsIgnoreCase("19.gif"))
				imageview.setBackgroundResource(R.drawable.a_19);
			if(weather.equalsIgnoreCase("20.gif"))
				imageview.setBackgroundResource(R.drawable.a_20);
			if(weather.equalsIgnoreCase("21.gif"))
				imageview.setBackgroundResource(R.drawable.a_21);
			if(weather.equalsIgnoreCase("22.gif"))
				imageview.setBackgroundResource(R.drawable.a_22);
			if(weather.equalsIgnoreCase("23.gif"))
				imageview.setBackgroundResource(R.drawable.a_23);
			if(weather.equalsIgnoreCase("24.gif"))
				imageview.setBackgroundResource(R.drawable.a_24);
			if(weather.equalsIgnoreCase("25.gif"))
				imageview.setBackgroundResource(R.drawable.a_25);
			if(weather.equalsIgnoreCase("26.gif"))
				imageview.setBackgroundResource(R.drawable.a_26);
			if(weather.equalsIgnoreCase("27.gif"))
				imageview.setBackgroundResource(R.drawable.a_27);
			if(weather.equalsIgnoreCase("28.gif"))
				imageview.setBackgroundResource(R.drawable.a_28);
			if(weather.equalsIgnoreCase("29.gif"))
				imageview.setBackgroundResource(R.drawable.a_29);
			if(weather.equalsIgnoreCase("30.gif"))
				imageview.setBackgroundResource(R.drawable.a_30);			
			if(weather.equalsIgnoreCase("31.gif"))
				imageview.setBackgroundResource(R.drawable.a_31);
		}
	 public void getWeather(String cityName) {
	  try {
	   textview1 = (TextView) this.findViewById(R.id.TextView01);
	   SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
	   rpc.addProperty("theCityName", cityName);

	   SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
	     SoapEnvelope.VER11);
	   envelope.bodyOut = rpc;
	   envelope.dotNet = true;
	   envelope.setOutputSoapObject(rpc);
	   HttpTransportSE ht = new HttpTransportSE(URL);

	   ht.debug = true;

	   ht.call(SOAP_ACTION, envelope);

	   detail = (SoapObject) envelope.getResponse();
	   parseWeather(detail);

	   return;
	  } catch (Exception e) {
	   e.printStackTrace();
	  }
	 }


	 
	 private void parseWeather(SoapObject detail)
	  throws UnsupportedEncodingException {
	  textview1 = (TextView) this.findViewById(R.id.TextView01);

	  String date = detail.getProperty(6).toString();
	  
	  
	  weatherToday = "\n天气:" + date.split(" ")[1];
	  weatherToday = weatherToday + "\n气温:"
	    + detail.getProperty(5).toString();
	  weatherToday = weatherToday + "\n风力:"
	    + detail.getProperty(7).toString() + "\n";
	  weatherNow = detail.getProperty(8).toString();
	  weatherWillBe = detail.getProperty(9).toString();

	  textview1.setText(et.getText() + weatherToday);
	  setIcon(weatherNow, image1);
	  setIcon(weatherWillBe, image2);

	 }
	}




main.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:orientation="vertical"
  4. android:layout_width="fill_parent"
  5. android:layout_height="fill_parent"
  6. android:background="@drawable/bg">
  7. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  8. android:layout_width="fill_parent"
  9. android:layout_height="wrap_content"
  10. android:orientation="horizontal">
  11. <EditText android:id="@+id/et"
  12. android:layout_width="237dp"
  13. android:layout_height="50dp"
  14. android:background="@drawable/shape"
  15. android:drawableLeft="@drawable/title"
  16. android:hint="北京/beijing/bj"
  17. android:padding="10px"
  18. android:singleLine="true"
  19. android:textColor="#FFFAFA" />
  20. <Button android:id="@+id/search_but"
  21. android:layout_width="wrap_content"
  22. android:layout_height="wrap_content"
  23. android:background="#00ff00ff"
  24. android:text="Search"
  25. android:textColor="#696969"
  26. android:textStyle="italic" />
  27. </LinearLayout>
  28. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  29. android:layout_width="fill_parent"
  30. android:layout_height="wrap_content"
  31. android:orientation="horizontal">
  32. <TableRow>
  33. <Button
  34. android:id="@+id/city1_1"
  35. android:layout_width="wrap_content"
  36. android:layout_height="wrap_content"
  37. android:background="#00000000"
  38. android:text="北京"
  39. android:layout_weight="0.25"
  40. android:textSize="20px"
  41. android:textColor="#FFFAFA" />
  42. <Button
  43. android:id="@+id/city1_2"
  44. android:layout_width="wrap_content"
  45. android:layout_height="wrap_content"
  46. android:background="#00ff00ff"
  47. android:text="上海"
  48. android:textSize="20px"
  49. android:layout_weight="0.25"
  50. android:textColor="#FFFAFA" />
  51. <Button
  52. android:id="@+id/city1_3"
  53. android:layout_width="wrap_content"
  54. android:layout_height="wrap_content"
  55. android:background="#00ff00ff"
  56. android:text="广州"
  57. android:textSize="20px"
  58. android:layout_weight="0.25"
  59. android:textColor="#FFFAFA" />
  60. <Button
  61. android:id="@+id/city1_4"
  62. android:layout_width="wrap_content"
  63. android:layout_height="wrap_content"
  64. android:background="#00ff00ff"
  65. android:text="深圳"
  66. android:textSize="20px"
  67. android:layout_weight="0.25"
  68. android:textColor="#FFFAFA" />
  69. </TableRow>
  70. </TableLayout>
  71. <TextView android:text=""
  72. android:id="@+id/TextView01"
  73. android:layout_width="wrap_content"
  74. android:layout_height="wrap_content"
  75. android:textColor="#000000"
  76. android:textSize="20px"/>
  77. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  78. android:layout_width="wrap_content"
  79. android:layout_height="wrap_content"
  80. android:orientation="horizontal">
  81. <ImageView android:id="@+id/image1"
  82. android:layout_width="wrap_content"
  83. android:layout_height="wrap_content"/>
  84. <ImageView android:id="@+id/image2"
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"/>
  87. </LinearLayout>
  88. </LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="vertical" 
	android:layout_width="fill_parent"
	android:layout_height="fill_parent" 
	android:background="@drawable/bg">
	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
		android:layout_width="fill_parent" 
		android:layout_height="wrap_content"
		android:orientation="horizontal">

		<EditText android:id="@+id/et" 
		android:layout_width="237dp"
			android:layout_height="50dp" 
			android:background="@drawable/shape"
			android:drawableLeft="@drawable/title" 
			android:hint="北京/beijing/bj"
			android:padding="10px" 
			android:singleLine="true" 
			android:textColor="#FFFAFA" />

		<Button android:id="@+id/search_but" 
		android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			 android:background="#00ff00ff"
			android:text="Search" 
			android:textColor="#696969" 
			android:textStyle="italic" />

	</LinearLayout>
	<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
		android:layout_width="fill_parent" 
		android:layout_height="wrap_content"
		android:orientation="horizontal">
		<TableRow>
			<Button
                android:id="@+id/city1_1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#00000000"
                android:text="北京"
                android:layout_weight="0.25"
                android:textSize="20px"
                android:textColor="#FFFAFA" />

            <Button
                android:id="@+id/city1_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#00ff00ff"
                android:text="上海"
                android:textSize="20px"
                android:layout_weight="0.25"
                android:textColor="#FFFAFA" />

            <Button
                android:id="@+id/city1_3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#00ff00ff"
                android:text="广州"
                android:textSize="20px"
                android:layout_weight="0.25"
                android:textColor="#FFFAFA" />

            <Button
                android:id="@+id/city1_4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#00ff00ff"
                android:text="深圳"
                android:textSize="20px"
                android:layout_weight="0.25"
                android:textColor="#FFFAFA" />
		</TableRow>
	</TableLayout>
	<TextView android:text="" 
		android:id="@+id/TextView01"
		android:layout_width="wrap_content" 
		android:layout_height="wrap_content"
		android:textColor="#000000"
		android:textSize="20px"/>
	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
		android:layout_width="wrap_content" 
		android:layout_height="wrap_content"
		android:orientation="horizontal">
	<ImageView android:id="@+id/image1"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"/>
	<ImageView android:id="@+id/image2"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"/>
	</LinearLayout>
</LinearLayout>

设置EditText边框颜色、透明
drawable/shape.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <shape xmlns:android="http://schemas.android.com/apk/res/android">
  3. <solid android:color="#00ff00ff"/>
  4. <corners android:radius="8px"/>
  5. <stroke android:width="3px"
  6. android:color="#0000CD"/>
  7. </shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#00ff00ff"/>
    <corners android:radius="8px"/>
    <stroke android:width="3px"
        android:color="#0000CD"/>
    
</shape>


AndroidManifest.xml中添加:

  1. <uses-permission android:name="android.permission.INTERNET">
  2. </uses-permission>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值