Android imitation Alipay payment bottom dialog, multiple module switching

Since going to work, every company I have joined has been very busy, and I couldn’t even write a blog if I wanted to. I found time today to write something. When I was working on a project, the client asked me to make an Alipay payment pop-up box. I started thinking about it for a long time and wanted to write. There are three bullet boxes, but after writing, the switching is not smooth, and then consider writing a bullet box with three modules in it to switch. After writing, I feel pretty good about the switching effect. I will share it today.

I wipe, the code is not good enough, then I will first talk about the idea, and then put the code, mainly to make a layout

The layout includes: order details, payment method, input password, three modules, relative layout, the layout of the payment method is on the left side of the order details, and the input password is also on the left side of the order details layout, so that only the layout of the order details can be seen after running , trigger the corresponding event, switch the corresponding layout, this is the layout, let's write a Fragment to inherit DialogFragment, of course, you can also use popupwindow, it doesn't matter, in fact, it's just this thing, and then make an animation, it's ok , I'm done, the code is up, I'll upload the demo, you can download it, if you don't understand, you can add me QQ 1094597973

 

When watching the demo, you don't need to look at the http part. That's what I wrote when I adjusted the network.

 Cloud disk address http://pan.baidu.com/s/1mhWUUfA

 If you wish to reprint, please indicate the source. Violators will be prosecuted

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326706151&siteId=291194637