[TUTO] How to make Theme for Touchwiz - Galaxy Grand 2 Themes and Apps

Hi i just want explain how to make theme for sectheme chooser
first i provide Evo.apk it's a basic theme i made for exemple
so let's start :
1-download Evo.apk
2-paste it in apktool "in" folder
3-decompil it
now go to out folder you will see Evo.apk Folder
So rename It to "your theme name.apk" (for an exemple i do it with "Hallowin" )
5-so open your folder "Hallowin"
Now open AndroidManifest.xml And change "Red"
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sec.android.theme.[COLOR="Red"]Evo[/COLOR]">
<application android:icon="@drawable/[COLOR="Red"]Evo[/COLOR]_icon" android:label="@string/app_name">
<activity android:name=".Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.SEC_THEME"/>
</intent-filter>
</activity>
</application>
</manifest>
i change to
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sec.android.theme.[COLOR="Lime"]Hallowin[/COLOR]">
<application android:icon="@drawable/[COLOR="Lime"]Hallowin[/COLOR]_icon" android:label="@string/app_name">
<activity android:name=".Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.SEC_THEME"/>
</intent-filter>
</activity>
</application>
</manifest>
now go to smali/com/sec/android/theme/ you will see Evo Folder so rename it to "Your Theme name" in my case Hallowin
go in and open R$attr.smali
Code:
.class public final Lcom/sec/android/theme/[COLOR="Red"]Evo[/COLOR]/R$attr; Change it to "[COLOR="Lime"]your theme name[/COLOR]"
.super Ljava/lang/Object;
.source "R.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/sec/android/theme/[COLOR="Red"]Evo[/COLOR]/R; Change it to "[COLOR="Lime"]your theme name[/COLOR]"
.end annotation
ok save it and open R$color.smali
Code:
.class public final Lcom/sec/android/theme/[COLOR="Red"]Evo[/COLOR]/R$color; Change it to "[COLOR="Lime"]your theme name[/COLOR]"
.super Ljava/lang/Object;
.source "R.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/sec/android/theme/[COLOR="Red"]Evo[/COLOR]/R; Change it to "[COLOR="Lime"]your theme name[/COLOR]"
.end annotation
do the same for all .smali when done return to res folder
go to value and open Public.xml find these line
Code:
<public type="drawable" name="Evo_icon" id="0x7f020002" /> and Change it to [COLOR="Lime"]your theme name[/COLOR]
now open string.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">[COLOR="Red"]Evo[/COLOR]</string> and Change it to ? "[COLOR="Lime"]your theme name[/COLOR]" :eek:
</resources>
do the same for all string.xml in different value folder
Now go to drawable-xhdpi folder
rename Evo_icon.png to "your themename"_icon.png
replace all the icon you want in and change the wallpaper andd create preview img ( For the icon make sure all the icon have 144X144
ok it's done so recompil it and sign it
Good work you've done your Personal Theme
So go on and Make some good Themes :good:
For exemple here is a screanshot of Hallowin theme i made for explain
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

thanks good tortual,is there any mod or flashable zip to change touchwz home or menu grid to 5x6 etc , i tried some mods but seems useless,olso how can i center the "apps" icon in buttom of touchwz homescreen ?? thanks again ?

salimtn said:
thanks good tortual,is there any mod or flashable zip to change touchwz home or menu grid to 5x6 etc , i tried some mods but seems useless,olso how can i center the "apps" icon in buttom of touchwz homescreen ?? thanks again ?
Click to expand...
Click to collapse
for 5x6 see my post here for app icon's i don't know
http://forum.xda-developers.com/galaxy-grand-2/help/65-app-drawer-stock-touchwiz-t2955094

maxx35000 said:
for 5x6 see my post here for app icon's i don't know
http://forum.xda-developers.com/galaxy-grand-2/help/65-app-drawer-stock-touchwiz-t2955094
Click to expand...
Click to collapse
thanks so much but its so difficult hhh,could you plz give me that file after modification and tell me where should i put it in my phone ? ?

Can you post a link of your hallowin theme

Related

[MOD][GUIDE][GB] Highlighted Chooserbox

Hey all!
If you have noticed, on ICS/JB there is a little transition when you click on a chooserbox. This is a nice feature which I like very much!
After doing some investigation on framework I realized that on res/drawable-mdpi there were some pngs which are needed for this feature to work.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Actually this feature exists on gingerbread but there aren't enough xmls to activate it. Seems like Google has abandoned the project because of some reasons. The closest reason is this :
"Google have not implemented the full sources of it because they wanted to reserve it for future releases. [On ICS/JB]"
Why do i think so? Because @SpaceCaker has discovered many secrets whose nature is like in our case. He has discovered weather information on lockscreen, Music Player Control on Lockscreen and also some codes and smalis which are present on ICS.
[Actually, I have used custom sources rather than using google's one]
Today I gonna show you how to fully implement it on GB! :victory:
Requirments :
-APK Multi Tools
-Notepad++
-Knowledge about xmls
-Sources on attachments
Click to expand...
Click to collapse
- Decompile framework-res.apk
1. Go to res/drawable/list_selector_background.xml
You will see something like this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_disabled" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/[B]list_selector_background_disabled[/B]" />
[COLOR="red"]<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/[B]list_selector_background_transition[/B]" />[/COLOR]
<item android:state_focused="true" android:drawable="@drawable/list_selector_background_focus" />
</selector>
2. Change the 2 red lines. It will look like this :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@color/transparent" />
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_disabled" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/list_selector_background_disabled" />
[COLOR="Red"]<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/[B]sniper_killer[/B]" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/[B]sniper_killer[/B]" />[/COLOR]
<item android:state_focused="true" android:drawable="@drawable/list_selector_background_focus" />
</selector>
3. Download the Highlight Chooserbox_source.zip in the attachment, extract it and put sniper_killer.xml on drawable folder.
It consists these lines :
Code:
<item android:duration="20" android:drawable="@drawable/sniper_status_bar_item_pressed_anim2" />
<item android:duration="20" android:drawable="@drawable/sniper_status_bar_item_pressed_anim2" />
<item android:duration="30" android:drawable="@drawable/sniper_status_bar_item_pressed_anim3" />
<item android:duration="30" android:drawable="@drawable/sniper_status_bar_item_pressed_anim4" />
<item android:duration="40" android:drawable="@drawable/sniper_status_bar_item_pressed_anim5" />
<item android:duration="50" android:drawable="@drawable/sniper_status_bar_item_pressed_anim6" />
<item android:duration="60" android:drawable="@drawable/sniper_status_bar_item_pressed_anim7" />
<item android:duration="60" android:drawable="@drawable/sniper_status_bar_item_pressed_anim8" />
4. Put the PNGs on res/drawable-mdpi
5. Recompile framework-res.apk and test
Click to expand...
Click to collapse
Proof :
[The transition changes in miliseconds making it impossible to capture.
But after tries and tries i finally managed to capture the transition ]
Pressed :
Click to expand...
Click to collapse
Selected :
Click to expand...
Click to collapse
Credits :
-ryanfebriyadi
-Google
-Me
Click to expand...
Click to collapse
Developers, if you decide to use it on your ROM just put my name on the credits! :good:
Leave a thanks if you find this helpful! :good:

[Q] Mysterious Permissions! Where did they get from?

Hello! I am really going mad!! Please help me! I am developing cm11 theme using other one as a template. But now I want to change the package name of apk!
I changed it using Eclipes, signed and recompiled it. But when i install this theme, it shows me new "Privacy" permissions with 2 items (see screenshot), that were not before (when I was using template's package name, compiling it using apktool and signing it with Zipsigner).
Is it OK to have "Privacy" permissions and these 2 items? (But I dont think so..) Or how can I remove them?
In manifest there are no changes except package and author names.
Here is the code:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.my.theme">
<meta-data android:name="org.cyanogenmod.theme.name" android:value="My Theme"/>
<meta-data android:name="org.cyanogenmod.theme.author" android:value="Me"/>
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name"/>
<uses-feature android:name="org.cyanogenmod.theme" android:required="true"/>
</manifest>
When I edit Manifest using Notepad and compile it Using Apktool I Get .apk file With 80KB.. When I edit manifest and smali folders and files, where is written package name, and compile it, I get normal apk but with old Package name!! What is the problem? Are there other ways to edit manifest?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Nurbolat said:
Hello! I am really going mad!! Please help me! I am developing cm11 theme using other one as a template. But now I want to change the package name of apk!
I changed it using Eclipes, signed and recompiled it. But when i install this theme, it shows me new "Privacy" permissions with 2 items (see screenshot), that were not before (when I was using template's package name, compiling it using apktool and signing it with Zipsigner).
Is it OK to have "Privacy" permissions and these 2 items? (But I dont think so..) Or how can I remove them?
In manifest there are no changes except package and author names.
Here is the code:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.my.theme">
<meta-data android:name="org.cyanogenmod.theme.name" android:value="My Theme"/>
<meta-data android:name="org.cyanogenmod.theme.author" android:value="Me"/>
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name"/>
<uses-feature android:name="org.cyanogenmod.theme" android:required="true"/>
</manifest>
When I edit Manifest using Notepad and compile it Using Apktool I Get .apk file With 80KB.. When I edit manifest and smali folders and files, where is written package name, and compile it, I get normal apk but with old Package name!! What is the problem? Are there other ways to edit manifest?
Click to expand...
Click to collapse
post the apk
I've already solved the problem The problem was in capability code in manifest

[GUIDE] How to add animation in Opera Mini

Hello brothers,
now, I want to share guide to add animation on Opera Mini, and you can make this guide also to other apk
1. decompile your opera mini
2. open res/layout/main.xml
add this code
<LinearLayout android:gravity="center" androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.rouf.Animasi android:id="@id/rouf_anim" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Click to expand...
Click to collapse
before this code
</merge>
like this
<LinearLayout android:gravity="center" androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.rouf.Animasi android:id="@id/rouf_anim" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</merge>
Click to expand...
Click to collapse
3. save
4. open res/values/ids.xml
add this code
<item type="id" name="rouf_anim">false</item>
Click to expand...
Click to collapse
before this code
</resources>
like this
<item type="id" name="rouf_anim">false</item>
</resources>
Click to expand...
Click to collapse
5. save
6. download smali and png of animation Here
7. after you downloaded, enter the png and animasi.xml to opmin_src/res/drawable/com/here
and add folder "rouf" to folder opmin_src/smali/here
8. and than open AndroidManifest.xml change
package="com.opera.mini.android"
Click to expand...
Click to collapse
like this
package="com.opera.mini.rouf
Click to expand...
Click to collapse
save
9. recompile.
10. after recompile you must decompile again to change id public of animasi.xml and png animations
11. open opmin_src/smali/com/rouf/Animasi.smali
12. change code id 0x7f080004 in line 37
with code id public type="id" name="rouf_anim"
and this code id 0x7f020008 in line 53
change with code id public type="drawable" name="animasi"
13. recompile, sign, install
SS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
THANKS TO :
ALLAH SWT
All members and admins of Group Oprek Galaxy Y Indonesia S5360 @fb
DONT FORGET TO PRESS THANKS IF YOU LIKE MY THREAD :good:
if you want to download my latest mod of Opera Mini you can visit here

[AOSP][STOCK TW][5.0][SAMSUNG][GLOWPAD][MOD]Glowpad for stock Caller ID AOSP style

Can we ported aosp glowpad button on our stock samsung dialer android 5.0 ? Can you give an assessment as an expert please
image:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thank you
upd i found sample of glowpad we can using it?
https://play.google.com/store/apps/details?id=net.sebastianopoggi.samples.ui.GlowPadSample
https://github.com/frakbot/GlowPadBackport
In order to use the GlowPadView in your project, follow these steps:
Ensure you have the Maven Central repository configured in your build.gradle file, eg.:
repositories {
mavenCentral()
}
This has to be in your app module's build.gradle or in the project's top-level build.gradle file. Android Studio puts it into the top-level file by default.
Add the dependency to your app's module build.gradle file, eg.:
Code:
dependencies {
// Your other dependencies...
compile 'net.frakbot.glowpadbackport:glowpadbackport:2.1.0'
}
Reference the GlowPadView in an XML layout (or initialise it from code)
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<net.sebastianopoggi.ui.GlowPadBackport.GlowPadView
android:id="@+id/incomingCallWidget"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="-10dp"
android:layout_marginBottom="-46dp"
android:background="@android:color/black"
android:visibility="visible"
android:gravity="top"
app:targetDrawables="@array/incoming_call_widget_2way_targets"
app:handleDrawable="@drawable/ic_in_call_touch_handle"
app:innerRadius="@dimen/glowpadview_inner_radius"
app:outerRadius="@dimen/glowpadview_target_placement_radius"
app:outerRingDrawable="@drawable/ic_lockscreen_outerring"
app:snapMargin="@dimen/glowpadview_snap_margin"
app:vibrationDuration="20"
app:feedbackCount="1"
app:glowRadius="@dimen/glowpadview_glow_radius"
app:pointDrawable="@drawable/ic_lockscreen_glowdot"/>
</RelativeLayout>
????
Profit!
Sample app
Click to expand...
Click to collapse
My friend finist1 make projects for aide you can using it
https://yadi.sk/d/E7xCPq8TdocFC
https://yadi.sk/d/hzZlbfa-docJq
He plug library now programmers can use it with app glowpad on full potential and take resources from it
Also this code we found in stock caller is very simmilar like glowpadsample
LegacyInCallUI\res\layout\answer_fragment.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.incallui.GlowPadWrapper android:gravity="center" android:id="@id/glow_pad_view" android:background="@android:color/black" android:focusable="true" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" dc:targetDrawables="@array/incoming_call_widget_3way_targets" dc:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" dc:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" dc:handleDrawable="@drawable/ic_in_call_touch_handle" dc:outerRingDrawable="@android:drawable/ic_lockscreen_sim" dc:innerRadius="@dimen/glowpadview_inner_radius" dc:outerRadius="@dimen/glowpadview_target_placement_radius" dc:glowRadius="@dimen/glowpadview_glow_radius" dc:vibrationDuration="20" dc:snapMargin="@dimen/glowpadview_snap_margin" dc:feedbackCount="1" dc:allowScaling="true"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:dc="http://schemas.android.com/apk/res-auto" />
GlowPadBackport-sample-release\res\layout\main.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<Button android:id="@id/btn_toggle_padmult" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/btn_toggle_multiplier" android:layout_alignParentTop="true" />
<net.sebastianopoggi.ui.GlowPadBackport.GlowPadView android:gravity="top" android:id="@id/incomingCallWidget" android:background="@android:color/black" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="-10.0dip" android:layout_marginBottom="-46.0dip" android:layout_below="@id/btn_toggle_padmult" app:targetDrawables="@array/incoming_call_widget_2way_targets" app:handleDrawable="@drawable/ic_in_call_touch_handle" app:outerRingDrawable="@drawable/ic_lockscreen_outerring" app:pointDrawable="@drawable/ic_lockscreen_glowdot" app:innerRadius="@dimen/glowpadview_inner_radius" app:outerRadius="@dimen/glowpadview_target_placement_radius" app:glowRadius="@dimen/glowpadview_glow_radius" app:vibrationDuration="20" app:snapMargin="@dimen/glowpadview_snap_margin" app:feedbackCount="1" />
</RelativeLayout>
stock caller

[GUIDE]How to add Animated Splash Screen to your Android App using Android Studio

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In this tutorial i will show you how to add simple Animated Splash Screen to your Android Application using Android Studio. You can add this Splash Screen either to existing Android Studio Project or New Android Studio Project.
Code is necessary for the implementation can be copied from here and watch the video below for the detail explanation of the implementation.
​
If you had not installed a plugin on your computer...Visit this link:​Click Here.​
Splashscreen.java
Code:
import android.app.Activity;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;
public class Splashscreen extends Activity {
public void onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
}
/** Called when the activity is first created. */
Thread splashTread;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splashscreen);
StartAnimations();
}
private void StartAnimations() {
Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
anim.reset();
LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay);
l.clearAnimation();
l.startAnimation(anim);
anim = AnimationUtils.loadAnimation(this, R.anim.translate);
anim.reset();
ImageView iv = (ImageView) findViewById(R.id.splash);
iv.clearAnimation();
iv.startAnimation(anim);
splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
// Splash screen pause time
while (waited < 3500) {
sleep(100);
waited += 100;
}
Intent intent = new Intent(Splashscreen.this,
MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
Splashscreen.this.finish();
} catch (InterruptedException e) {
// do nothing
} finally {
Splashscreen.this.finish();
}
}
};
splashTread.start();
}
}
layout/activity_splashscreen.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#242729"
android:layout_gravity="center"
android:id="@+id/lin_lay"
android:gravity="center"
android:orientation="vertical" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/splash"
android:background="@drawable/splash_img" />
</LinearLayout>
anim/alpha.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="3000" />
anim/translate.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android">
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0%"
android:toXDelta="0%"
android:fromYDelta="200%"
android:toYDelta="0%"
android:duration="2000"
android:zAdjustment="top" />
</set>
And now the last code that is for AndroidManifest.xml. Here we have to add a new activity for our java class(Splashscreen)
AndroidManifest.xml
Code:
<activity
android:name=".Splashscreen"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Put these code before MainActivity and change MainActivity's "android.intent.category.LAUNCHER" to "android.intent.category.DEFAULT"
Copy an image with name splash_img in png format.
So this is the simple way to add Animated Splashscreen to you Android App.
Now go to buil in top menu of Android Studio and select Generate signed Apk and epxort your Application. After Succesfull export copy it to your phone and install. Or Upload to play store.
Thanks to Karthik M
Pls hit the thanks button if i helped you:angel:
For more information-Visit: http://androidtechfreakat.blogspot.in
http://androidtechxdaat,weebly.com
http://advaitt17.github.io
All these codes are hosted with GitHub. You can visit there. The link is given in the source code.
XDA:DevDB Information
[GUIDE]How to add Animated Splash Screen to your Android App using Android Studio , App for all devices (see above for details)
Contributors
AdvaitT17, Karthik M
Source Code: https://github.com/AdvaitT17/How-to-add-Animated-Splash-Screen-to-you-Android-App-using-Android-Studio.-
Version Information
Status: Stable
Created 2016-04-02
Last Updated 2016-04-03
RESERVED

Categories

Resources