登录
首页 » Android » 多种页面进度展示

多种页面进度展示

于 2022-08-09 发布 文件大小:1.60 MB
0 63
下载积分: 2 下载次数: 1

代码说明:

应用背景有页面进度展示需求的app,以及对进度展示效果有需求的app关键技术自定义控件,用paint和canvas绘制ui,暴露回调给用户设置进度,拿到进度后重绘ui

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Android 手机发短信的例子
    Android SendSMS 手机发短信的例子+源代码,简单的很。如测试截图所示,单击按钮实现发短信功能。
    2022-08-17 19:11:26下载
    积分: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
  • masktextfield源代码
    This source code shows how to implement masked edittext on android.
    2022-08-04 10:44:58下载
    积分:1
  • eoeAndroid-Android-widget-Ver-2.pdf
    Androidƽ̨Widget
    2011-04-08 11:57:22下载
    积分:1
  • Helloworld
    android hello world程序(android hello world program)
    2012-08-01 20:36:13下载
    积分:1
  • 个人备忘录
       一个毕业设计的个人备忘录,里面包括设置提醒方式,可以设置铃声,可以进行换肤,还可以切换角色,可以进行功能切换,有些功能还没有完善,欢迎指教
    2023-08-10 06:15:04下载
    积分:1
  • 安卓设备的监控
    在手机客户端(Android)通过实现Camera.PreviewCallback接口,在其onPreviewFrame重载函数里面获取摄像头当前图像数据,然后通过Socket将图像数据和相关的用户名、命令等数据传输到服务器程序中。服务器端(PC端)采用C#编写,通过监听相应的端口,在获取数据后进行相应的命令解析和图像数据还原,然后将图像数据传递至PictureBox控件中用于显示,这样就实现了手机摄像头的视频数据实时传输到服务器上。如果需要将这些视频进行转发,通过服务器再将这些数据复制转发即可。
    2023-09-09 07:25:03下载
    积分:1
  • SplashActivity
    简介高效安卓功能开发:自动更新提醒 简介高效安卓功能开发:自动更新提醒(Simple and efficient development of Android features: automatic update reminders)
    2015-12-05 16:33:18下载
    积分:1
  • Android例子源码支持实时摄像头滤镜的GPUImage
    应用背景Android例子源码支持实时摄像头滤镜的GPUImage关键技术Android,GPUimage过滤器,实现各种各样图像滤镜(图像处理)效果,多达50多种效果,基本囊括了最常见的图像处理效果。包括:contrast,hue,gamma,brightness,sharpness,emboss,saturation,exposure,shadow,blend等等。
    2023-05-05 18:40:03下载
    积分:1
  • BMS源码
    【实例简介】
    2021-10-17 00:30:55下载
    积分:1
  • 696518资源总数
  • 104226会员总数
  • 29今日下载