If you are not read yet the part-08 blog then first of all you read and implement part-08 visit CLICK HERE also you can watch our YouTube video Click Here.
In this blog we are creating in the MainActivity.java file means HomePage of your android application. We implement all remaining code of this application.
First, we create a variable content which is using under on Create class. So we can take three types of variable layout.
- CardView Layout
CardView facebook, google, phone;
float v = 0;
Now we can implement all layouts which we have created in the previous blog under the onCreate method class like Tab layout, ViewPager, Facebook, Google, and Phone. These names are implemented in the activity_main.xml layout file.
TabLayout tabLayout = findViewById(R.id.tabLayout);
ViewPager viewPager = findViewById(R.id.viewPager);
facebook = findViewById(R.id.facebookLogin);
google = findViewById(R.id.googleLogin);
phone = findViewById(R.id.phoneLogin);
viewPagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
Now, we can add all fragment layouts which was we created means Login Fragment and Signup Fragment and we can set tab gravity system and also set adapter with ViewPager and tab layout set with view pager.
// Add Fragment
viewPagerAdapter.AddFragment(new LoginFragment(), "Login");
viewPagerAdapter.AddFragment(new SignupFragment(), "Signup");
Next, we can set a default animation method which was created in the Login Fragment layout if you still did not read it yet then we will suggest you first read that blog then you can follow this blog. All blogs are connected with each other.
We can set the translationY method in Facebook, Google, Phone, and Tab Layout.
Next, we can set the Alpha values in Facebook, Google, Phone, and Tab Layout.
Next, we can set animation with delay time as per our requirement in Facebook, Google, Phone, and Tab Layout.
Finally, we created a complete app with these blog parts. If you want to buy the complete package CLICK HERE and also you can watch our complete Tutorial CLICK HERE.