Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Teaching & learning

Egoitz Gonzalez aldakur

💭
Teaching & learning
View GitHub Profile
@gunhansancar
gunhansancar / LocaleHelper.java
Last active Apr 8, 2021
While developing your awesome application, sometimes you are required to add a language change feature to your app on the fly. However, Android OS does not directly support this behaviour. And therefore, you need to solve this situation in some other ways. For more details see http://gunhansancar.com/change-language-programmatically-in-android/
View LocaleHelper.java
package com.gunhansancar.changelanguageexample.helper;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.preference.PreferenceManager;