- 博客(4)
- 资源 (7)
- 收藏
- 关注
原创 MediaPlayer + SurfaceView播放视频时,保持视频原始比例的方法。
public static Size getOptimalDisplaySize(Context context, int videoWidth, int videoHeight) { int orientation = context.getResources().getConfiguration().orientation; int screenWidth = context.getResources().getDisplayMetrics().widthPixels; int.
2020-08-14 15:49:38
819
原创 Android 不规则图形布局的一种实现方法
1. 自定义布局: public class ImageClip extends FrameLayout { private int width = -1; private int height = -1; private Bitmap bitmap; public ImageClip(Context context) { super(cont...
2019-10-11 18:34:11
701
原创 socket通信
socket server: int main(int argc, char* argv[]) { int sockfd, connfd; if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0){ perror("socket create error!"); exit(-1); ...
2019-09-18 10:15:58
219
原创 Android 蓝牙连接
定义广播: private BroadcastReceiver bluetoothReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); ...
2019-09-17 19:07:51
213
51单片机红外编码解码模拟仿真
2010-03-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人