Difference between View and View Group
Slno | View | View Group |
---|---|---|
01. | View is simply a rectangle structre that is used to create required UI designs for an Activity which responds the user’s actions or events. | ViewGroup is an invisible frame or container, normally used to hold/combine one or more View and ViewGroup together. |
02. | A View object is a component of the user interface (UI) design. | A ViewGroup object is a layout/container. |
03. | Examples of Views are TextView, EditText, Button, CheckBox, RadioButton, Password tc. | Examples of View groups are Linear Layout, Relative Layout etc. |
04. | View belongs to the 'android.view.View' class | ViewGroup belongs to the 'android.view.ViewGroup' class |
Difference between Activity and Fragment
Slno | Activity | Fragment |
---|---|---|
01. | Activity is an Android application component that gives a platform for UI designs for user interaction. | The fragment is the part of an activity which is basically used to contributes its UI to that activity. |
02. | An Activity is not dependent on fragment i.e. it exists independently from Fragment. | Since a Fragment is the part of an Activity hence dependent on that Activity. Thus, it can’t exist independently. |
03. | An Activity is normally used to create single screen UI design. | Fragment is used to create multiple screen UI in an Activity. |
04. | Activity is required to mention in the manifest file. | Fragment is not required to mention in the manifest file. |
05. | Life cycle methods of Activity is controlled or monitored by that hosted OS of that system. | Life cycle methods of Fragments are controlled or monitored by that hosted Activity. |
06. | Activity is not a light-weight object. | Fragment is a light-weight object. |
Difference between Dalvik and ART
Slno | dvm | ART |
---|---|---|
01. | DVM stands for Dalvik Virtual Machine. | ART stands for Android Run Time. |
02. | It has JIT compiler(Just-In-Time). | It has AOT compiler(Ahead-Of-Time). |
03. | Old Android compiler. | New Android Compiler. |
04. | DVM converts bytecode every time when we launch a specific app. | ART converts bytecode just once at the time of app installation. Thus it makes CPU execution faster and easier and hence improved battery life. |
05. | This compiler takes longer app loading time. | This compiler takes smaller app loading time. |
06. | This compiler works best for small storage devices. | This compiler works best for Large storage devices. |
07. | DVM uses less memory space during compilation due to JIT concept. | ART uses comparatively more storage space internally during compilation due to AOT concept. |
08. | App installation time is comparatively lower as the compilation process is performed later. | App installation time is comparatively longer as compilation is done during the installation of App. |
0 Comments