Skip to content

Commit

Permalink
All branches ready to pulish
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitSurwase committed Jan 1, 2017
1 parent bf55388 commit 34e46e5
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* This class is used to Auto Read SMS Received.
* Created by Rohit.
* Created by rohitss.
*/
public class SmsReceiver extends BroadcastReceiver {
//TODO: Change this constant according to your project "SMS_SENDER_NAME"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.rohitss.navigationdrawerinapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

Expand All @@ -10,4 +10,5 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
//TODO: This demo app will be ready soon.
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* This class is used to Pick and Crop Image using Camera/Gallery application.
* This class uses- "Android-Image-Cropper" by "ArthurHub" library to crop image.
* Library github link - "https://github.com/ArthurHub/Android-Image-Cropper"
* Created by RohitSS
* Created by rohitss
*/

public class ImageUtilityHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
import android.view.View;
import android.widget.ImageView;

/**
* This is the activity class where we want to add image picker.
* Created by rohitss.
*/
public class MainActivity extends AppCompatActivity {
public static final int IMAGE_CHOOSER_CODE = 100;
private static final int WRITE_PERMISSION_CODE = 5;
Expand All @@ -38,9 +42,10 @@ protected void onCreate(Bundle savedInstanceState) {

public void pickAndCropImage(View view) {
if (ContextCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
//Permission denied, so request permission
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_PERMISSION_CODE);
} else {
//TODO: Function that requires permission
//Permission allowed
getImageChooser();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;


/**
* Created by JayYogeshwar on 27-12-2016.
* This is dummy activity which will show up after flash screen.
* Created By rohitss.
*/
public class SecondActivity extends AppCompatActivity {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
import android.view.Window;
import android.view.WindowManager;

/**
* This is activity class which will act as a flash screen.
* This class dont have any view at all.
* Created By rohitss.
*/
public class SplashActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
//setContentView is not needed as we are showing splash screen using theme in styles.
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

//Add 2 seconds pause for splash screen using handler
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
Expand All @@ -27,6 +34,7 @@ public void run() {
@Override
protected void onStop() {
super.onStop();
//finish splash screen activity.
finish();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

/**
* This is the class where we want to add swipeable tabs.
* Created By - rohitss.
*/
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

//Initialize VIewPager
ViewPager mViewPager = (ViewPager) findViewById(R.id.viewPager_Home);
TabLayout mTabLayout = (TabLayout) findViewById(R.id.tabLayout_Home);
MyViewPagerAdapter myViewPagerAdapter = new MyViewPagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(myViewPagerAdapter);
//Sync TabLayout with ViewPager.
mTabLayout.setupWithViewPager(mViewPager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import android.support.v4.app.FragmentStatePagerAdapter;

/**
* Created by JayYogeshwar on 06-12-2016.
* This is the adapter class for our ViewPager.
* This class extends FragmentStatePagerAdapter for better performance.
* Created By - rohitss.
*/
public class MyViewPagerAdapter extends FragmentStatePagerAdapter {
private String[] arrTabNames = {"Page 1", "Page 2", "Page 3"};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.rohitss.swipeabletabs;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
* A simple {@link Fragment} subclass.
* This is a dummy fragment.
* Created By - rohitss.
*/
public class OneFragment extends Fragment {

Expand All @@ -25,6 +24,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_home, container, false);
}

public static OneFragment newInstance() {

Bundle args = new Bundle();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
package com.rohitss.swipeabletabs;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
* A simple {@link Fragment} subclass.
* This is a dummy fragment.
* Created By - rohitss.
*/
public class ThreeFragment extends Fragment {


public ThreeFragment() {
// Required empty public constructor
}


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.rohitss.swipeabletabs;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
* A simple {@link Fragment} subclass.
* This is a dummy fragment.
* Created By - rohitss.
*/
public class TwoFragment extends Fragment {

Expand All @@ -25,6 +24,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_charge, container, false);
}

public static TwoFragment newInstance() {

Bundle args = new Bundle();
Expand Down

0 comments on commit 34e46e5

Please sign in to comment.