Pull down to record video in the same way as WeChat

Pull down to record video in the same way as WeChat

Source code introduction:

This project is a high imitation of WeChat short video + Miaopai. WeChat has launched the short video function since version 6.0. With the emergence of 4G network, video will be a trend. It can express things that words cannot express, increasing the stickiness of WeChat. Remember when the WeChat short video function was launched, it swept the circle of friends like a virus. Project source: https://github.com/motianhuo/VCameraDemo

Source code effect:

Source code snippet:

  1. package com.example.wechat01.adpter;
  2.   
  3. import android.content.Context;
  4. import android.view.LayoutInflater;
  5. import android.view.View;
  6. import android.view.ViewGroup;
  7. import android.widget.BaseAdapter;
  8. import android.widget.TextView;
  9.   
  10. import com.example.wechat01.R;
  11.   
  12. public   class NewMsgAdpter extends BaseAdapter {
  13. protected Context context;
  14. LayoutInflater mInflater;
  15.   
  16. public NewMsgAdpter(Context ctx) {
  17. context = ctx;
  18. }
  19.   
  20. @Override  
  21. public   int getCount() {
  22. return   5 ;
  23. }
  24.   
  25. @Override  
  26. public Object getItem( int position) {
  27. return   null ;
  28. }
  29.   
  30. @Override  
  31. public   long getItemId( int position) {
  32. return position;
  33. }
  34.   
  35. @Override  
  36. public View getView( int position, View convertView, ViewGroup parent) {
  37. if (convertView == null ) {
  38. convertView = LayoutInflater.from(context).inflate(
  39. R.layout.layout_item_msg, parent, false );
  40. TextView txtnum = (TextView) convertView
  41. .findViewById(R.id.unread_msg_number);
  42. if (position == 0 ) {
  43. txtnum.setVisibility(View.VISIBLE);
  44. } else {
  45. txtnum.setVisibility(View.GONE);
  46. }
  47. }
  48.   
  49. return convertView;
  50. }
  51. }

Download address: http://download..com/data/2171547

<<:  Watch is a powerful open source project abroad

>>:  The common technology terms in the IT circle that you must know in 2016

Recommend

Can we distinguish different leopards by their calls? | Nature Trumpet

This is the 73rd issue of the Nature Trumpet colu...

The latest gamification operation methodology in 2020!

Preface How can you make users addicted to your p...

Short-term leader tactics

Introduction to the short-term leader tactics of ...

This little black box can crack the passcode of almost any iPhone

It doesn't matter whether you add a fingerpri...

Is soup a kind of "junk food"? How can we drink soup scientifically?

Soup is a nutritious and nourishing dish on many ...

Methods and strategies for new media operations to follow hot topics!

Is it useful to follow hot topics? In this articl...

How to enter the R&D department of BAT?

[[145327]] I received offers from BAT and NetEase...

New media operation and promotion tips for increasing followers!

Today, we will explain in detail how to increase ...

5 key points to detail the user growth methodology!

Before doing product operations and promotion wit...