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

Product Operations: How to develop a growth strategy for a product?

After the concept of growth hacking was introduce...

Analysis and judgment of the decline in user activity!

User behavior data is a foundation that can help ...

A better way to visualize microservice architectures

I have been using draw.io for some things related...

There is no public domain traffic in the world

2020 is also known as the "first year of the...

What should I do if the traffic of TikTok is restricted? These 6 tips work!

Douyin’s traffic comes from two aspects. On the o...

What's the difference between Google and Tesla's self-driving technology?

Would you watch how a rice cooker cooks rice? You...

Intel i3 vs i5: Which processor is right for you?

In the current computer processor market dominate...

It’s 2020, but I still want to buy a 4G phone

It's interesting to say that as an editor of ...

These 3 information flow cases increased my monthly salary to 30,000!

Next, let’s look at some interesting cases. Case ...

Blind box marketing is a double-edged sword!

In the past two years, the blind box economy has ...