[Android General] stangdriver44:
[Guide] Animated Rom Logo added to your source build​

The following guide is intended for but not limited too Rom Control.

The only limitation is your creativity.

This guide is instructed on building from source in compliance with the developers of Rom Control. This is not a guide for using apktool to decompile the apk, the code is in java

Not going to go into any details on how to use Android Studio or building from source, you should know this if your using this guide.

1) download files

2) Place the java and drawable files using the given path (com.wubydax.romcontrol.v2.utils)

3) Open nav_header_main.xml in the layout folder

4) make the following changes

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/header"/>

to this

<com.wubydax.romcontrol.v2.utils.AnimateRomLogo
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/animated_romlogo"/>

VERY IMPORTANT you change the ImageView to the directed path of the new AnimateRomLogo!!! If you don't you will not have an animated logo

*Original*

<?xml version="1.0" encoding="utf-8"?>
<!--/* Created by Roberto Mariani and Anna Berkovitch, 2015-2016
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:gravity="bottom"
>

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/header"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/protective_gradient_bottom"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="6thGear Rom Control"
android:textColor="@android:color/white"
android:layout_margin="10dp"
android:textSize="18sp"
android:textStyle="bold"/>

</FrameLayout>

*Modded*

<?xml version="1.0" encoding="utf-8"?>
<!--/* Created by Roberto Mariani and Anna Berkovitch, 2015-2016
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:gravity="bottom"
>

<com.wubydax.romcontrol.v2.utils.AnimateRomLogo
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/animated_romlogo"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="Animated Rom Logo"
android:textColor="@android:color/white"
android:layout_margin="10dp"
android:textSize="14sp"
android:textStyle="bold"/>

</FrameLayout>

in that layout is some adjustability for your image.

You can play with

android:paddingXxx="??.?px"

or

android:layout_marginXxx="?.?dip"

as well as

android:scaleType="??xxx"

The drawable images are just a generic set of images being called from the xml drawable to animate the array

of course you can use any animation you want, only your creativity is the limit.

5) Open the animated_romlogo.xml just to get familiar with the details inside

you will see

<item android:duration="250" android:drawable="@drawable/animated_romlogo_01" />
<item android:duration="250" android:drawable="@drawable/animated_romlogo_02" />
...
..

.

pretty simple,

android:duration="xxx"

is how long each frame will show until the next one comes (longer duration=slower animation

android:drawable="@drawable/xxx_xxx_000"

is the name of your image files.

MAKE SURE your images names match what you have in here!!!

you can use various image formats.

I've used png, jpg and vector, I am sure others will work too

6) build your apk and push to device, that's it, your done!!!

Now enjoy and have fun with it!!

For fc error

FATAL EXCEPTION:

..

..

..

Caused by: java.lang.OutOfMemoryError: Failed to allocate a 1638412 byte allocation with 475800 free bytes and 464KB until OOM

at dalvik.system.VMRuntime.newNonMovableArray(Native Method)

Move ALL image drawables (as in png, jpg etc) to either drawable-xxxhdpi or the nodpi folder which worked great for me!

Animated Rom Logo

Thanks of course the the developers and those who assisted in the build of Rom Control

Thanks you [MENTION=293887]Morningstar[/MENTION] for the original concept here