-
android6.0 运行时权限封装
android6.0 运行时权限封装,android6.0 运行时权限封装,android6.0 运行时权限封装,android6.0 运行时权限封装,android6.0 运行时权限封装,android6.0 运行时权限封装,android6.0 运行时权限封装
- 2022-06-14 23:19:58下载
- 积分:1
-
android计算器源码文件
android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器,android,基于eclipse的计算器。
- 2022-05-10 19:29:39下载
- 积分:1
-
android浏览器源码
基于开源架构的安卓浏览器源码,浏览速度,图片加载速度均有大幅度提升,可以方便的移植于多种安卓平台。欢迎广大朋友下载测试,提出宝贵的意见与建议
- 2022-02-10 05:12:57下载
- 积分:1
-
Android之socket
通过socket实现对服务器的通信。使带有wifi模块的单片机能够进行无线控制,例如继电器,步进电机等等。
- 2022-01-26 02:15:32下载
- 积分:1
-
android 自定义的seekbar
实现android的 seekbar的分段序列,能自动设置段落数,实现在多选的情况下舍弃RadioButton,自定义选项的作用
- 2022-04-30 02:24:05下载
- 积分:1
-
Android-API-
android API chm文档,希望对大家有帮助。
里面邮箱系的说明,更主要的是他是中文版的哦(The Android API chm document, we want to help. Inside the mailbox Department, the main thing is that he is a Chinese version of Oh)
- 2013-04-22 14:06:36下载
- 积分:1
-
Android tcp通讯学习用
核心代码:package com.Test;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.util.Log;import android.app.Activity;import android.view.Menu;import android.widget.Button;import android.view.View;import android.view.View.OnClickListener;import java.io.BufferedInputStream;import java.io.InputStream;import java.io.OutputStream;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.io.InputStreamReader;import java.io.BufferedReader;import java.io.PrintWriter;import java.io.Reader;import java.net.Socket;import java.net.ServerSocket;import java.net.UnknownHostException;import android.view.TextureView;import android.widget.EditText;import java.lang.String;import java.lang.Thread;public class MainActivity extends Activity implements OnClickListener{ private Button m_btn; private Button m_sendbtn; private ServerSocket mySerSocket; private Socket clientSocket; private EditText m_edit; private String line; boolean conn = true; private Socket accSocket; private static final String Host = "10.0.2.2"; private static final int Port = 12000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); m_btn = (Button)findViewById(R.id.button1); m_sendbtn = (Button)findViewById(R.id.button2); m_edit = (EditText)findViewById(R.id.editText1); //m_btn.setOnClickListener(this); m_btn.setOnClickListener(new ReceiverListener()); m_sendbtn.setOnClickListener(this); //Socket clientSocket = new Socket(Host, Port); } class ReceiverListener implements OnClickListener { private ReceiveThread mReceiveThread = null; private boolean stop = true; private Handler mHandler = null; public void onClick(View v) { try { if(clientSocket == null) { clientSocket = new Socket(Host, Port); } // InputStream myInputStream = clientSocket.getInputStream();// // //BufferedReader in = new BufferedReader(new InputStreamReader(myInputStream));//// byte [] buffer = new byte[myInputStream.available()]; //int temp = 0; //String strMsg = in.readLine(); // myInputStream.read(buffer);// // // String strMsg = new String(buffer);// // m_edit.setText(strMsg);// while ((temp = myInputStream.read(buffer)) != -1)// {// m_edit.setText(new String(buffer, 0, temp));//// } mReceiveThread = new ReceiveThread(clientSocket); stop = false; mReceiveThread.start(); } catch (IOException e) { e.printStackTrace(); } //消息处理 mHandler = new Handler() { public void handleMessage(Message msg) { m_edit.setText((msg.obj).toString()); } }; } private class ReceiveThread extends Thread { private InputStream inStream = null; private byte[] buf; private String str = null; ReceiveThread(Socket s) { try { this.inStream = s.getInputStream(); } catch(IOException e) { e.printStackTrace(); } } public void run() { while(!stop) { this.buf = new byte[512]; try { this.inStream.read(this.buf); } catch(IOException e) { e.printStackTrace(); } try { this.str = new String(this.buf, "GB2312").trim(); } catch(UnsupportedEncodingException e) { e.printStackTrace(); } Message msg = new Message(); msg.obj = this.str; mHandler.sendMessage(msg); } } } } public void onClick(View v) {// if (v.getId() == R.id.button1)// {// new Thread()// {// public void run()// {// try // {// if(clientSocket == null)// {// clientSocket = new Socket(Host, Port);// } // InputStream myInputStream = clientSocket.getInputStream();// // BufferedReader in = new BufferedReader(new InputStreamReader(myInputStream));//// byte [] buffer = new byte[1024 * 4];//// int temp = 0;// // String strMsg = in.readLine();// // //myInputStream.read(buffer);// // //String strMsg = new String(buffer);// // m_edit.setText(strMsg);////// while ((temp = myInputStream.read(buffer)) != -1)//// {//// m_edit.setText(new String(buffer, 0, temp));//////// }// // }// catch (IOException e)// {// e.printStackTrace();// }// }// }.start();// // } if(v.getId() == R.id.button2) { new Thread() { public void run() { try { if(clientSocket == null) { clientSocket = new Socket(Host, Port); } //inputStream clientInputStream = clientSocket. String msg = "RESET-SHOW"; //InputStream clientInputStream = clientSocket.getInputStream(); //BufferedReader br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); //BufferedReader br = new BufferedReader(); //line = br.readLine(); OutputStream clientOutputStream = clientSocket.getOutputStream(); byte buffer[]=msg.getBytes(); clientOutputStream.write(buffer); clientOutputStream.flush(); //int temp = 0; // PrintWriter out = new PrintWriter(clientOutputStream);// // out.println("Serer Message: " msg); } catch(IOException e) { e.printStackTrace(); } } }.start(); } }private Reader InputStreamReader() { // TODO Auto-generated method stub return null; }// private Handler handler = new Handler()// {// public void handleMessage(Message msg)// {// super.handleMessage(msg);// //处理UI// m_edit.setText("Finish");// Log.i("PDA", "Finish");// // }// }; @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; }}
- 2014-08-18下载
- 积分:1
-
蓝牙串口聊天大师
蓝牙串口聊天大师使用 android 的聊天应用程序。在互联网上最好的代码
- 2022-04-10 19:39:31下载
- 积分:1
-
android照片移动app
private class ImageViewOnTouchListener implements OnTouchListener {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction() & MotionEvent.ACTION_MASK) {// 这里取出来的是event.getAction()返回的值的低八位,MotionEvent.ACTION_MASK是255,
case MotionEvent.ACTION_DOWN:
startPoint.set(event.getX(), event.getY());
break;
case MotionEvent.ACTION_MOVE:// 移动过程,该事件会不断被触发
float dx = event.getX() -
- 2022-01-30 14:46:32下载
- 积分:1
-
微信6.0界面
实现微信6.0界面的滑动界面,还有底部的自定义view,能够实现随着fragment的拖动而实现颜色渐变
- 2022-06-17 14:21:05下载
- 积分:1