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

How to write copy that hits the user’s pain points?

Good copywriting needs to be revised. It is very ...

The dilemma of Three Squirrels’ e-commerce marketing!

As the annual "Double Eleven" approache...

Online promotion channels for product operation and promotion plans!

In the mobile Internet industry, the market for g...

Is our love of drinking determined by our genes?

Leviathan Press: Both the United States and the S...

Keep Product Analysis Report

As people pay more and more attention to health a...

How KOLs earn millions by selling courses (Part 1)

The online education industry has become a hot sp...