How I can create class for reuse it

How I can create class for reuse it?


Well one in the most important trick for build scalable and big applications is build with structure and reuse for reduce complexity and work more easy and fast.


-- Divide and Conquer -- 

Now, I will recoment follow this.


Just you make a public class and you can import from other classes for example:


public class MyClass{
   code here
}



You can make a folder, for example called "Globals" and put the file in this folder. After that you can import folder like a package like this.




packge mx.com.apname.Globals;


And now you can use the class.



References

Document
https://developer.android.com/reference/android/support/v7/app/AppCompatActivity

Videos explan what is ActivityComponent

https://www.youtube.com/watch?v=D4J6WZjRQV0 


Comments

Popular posts from this blog

Add image from URL

Retriving Android API version by code