hamidness / restring Goto Github PK
View Code? Open in Web Editor NEWReplace bundled Strings dynamically, or provide new translations, for Android
Replace bundled Strings dynamically, or provide new translations, for Android
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5876)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at com.ice.restring.SharedPrefStringRepository.deserializeKeyValues(SharedPrefStringRepository.java:83)
at com.ice.restring.SharedPrefStringRepository.loadStrings(SharedPrefStringRepository.java:65)
at com.ice.restring.SharedPrefStringRepository.(SharedPrefStringRepository.java:23)
at com.ice.restring.Restring.initStringRepository(Restring.java:81)
at com.ice.restring.Restring.init(Restring.java:40)``
Hey,
In the method "deserializeKeyValues" in SharedPrefStringRepository, it will be nice to add a condition to check if the index/size of keyValues is correct before to try to access at one value. It could be a source of NPE according some cases.
Thank and nice work!
Please add a wiki so documentation can be improved with community additions
Documentation is not good for beginners. Please add an full example how to use it in a simple MainActivity class
RestringResources
relies on a deprecated constructor. The description about the deprecation is:
Resources should not be constructed by apps. See Context.createConfigurationContext(Configuration).
It appears that replacing the Resources
instance with custom one is not something Android intends to support. Any ideas about what to do if they do remove that constructor? I see another public constructor, but its documentation is marked with @hide
, for which I would expect an implementation that used it to be equally brittle.
@B3nedikt I think you should add an issues list to your fork. I would have posted this question to there, had it existed. I could understand wanting to have the issues for Restring be in a single place, but having an issues list might give others an idea of how much other people are using your fork.
I'm getting this error, any recommendation?
Locale.setDefault(newLocale); in main activity?
It seems that this project has been abandoned, since there have been no commits since May the 1st of 2018 and the maintainer had his last activity on GitHub on March the 18th of 2019.
First I would like to take this opportunity to thank @hamidness for this awesome library. Additionally I suggest to set the repository state to "Unsupported" if there is no intent of continuing its development or accepting any pull request.
When I used this library with webview with javascript enabled , while clicking the spinner inside the webview I get this exception
Fatal Exception: android.content.res.Resources$NotFoundException
Resource ID #0x0
Fatal Exception: java.lang.RuntimeException
An error occured while executing doInBackground()
android.os.AsyncTask$3.done
Caused by java.lang.NullPointerException
Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
com.ice.restring.StringsLoaderTask.doInBackground
com.ice.restring.StringsLoaderTask.doInBackground (StringsLoaderTask.java:36)
com.ice.restring.StringsLoaderTask.doInBackground (StringsLoaderTask.java:16)
android.os.AsyncTask$2.call (AsyncTask.java:292)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
java.lang.Thread.run (Thread.java:818)
On devices API 19:
java.lang.NoClassDefFoundError: android.widget.Toolbar
at com.ice.restring.ToolbarTransformer.getViewType(ToolbarTransformer.java:21)
at com.ice.restring.ViewTransformerManager.registerTransformer(ViewTransformerManager.java:24)
at com.ice.restring.Restring.initViewTransformer(Restring.java:94)
at com.ice.restring.Restring.init(Restring.java:41)
ViewPump is a library intended to make integrating libraries like Restring much easier by not having to install their own LayoutInflater
. It would be neat if Restring delegated view inflation to ViewPump so that it would play along nicely with Calligraphy and other libraries that want to do things with LayoutInflater
s
I notice that the initial loading of strings is handled in an async task when you init the restring library in Application.onCreate();
This means that your first Activity can be shown before the loading of strings is complete and it therefore fails to show the dynamic strings.
I suggest allowing a way to synchronously initialise the string repository at boot time. This means locking the UI thread briefly but at least guarantees your strings will be ready before the first activity is presented.
It is always showing English strings on many devices such as Pixel 2 XL, latest Mi devices etc. no matter what language is set. The problem I identified is with static String getCurrentLanguage() method in RestringUtil.java class. Read this stackoverflow answer. Changing getCurrentLanguage() method made it work for me.
If user make custom component text view with Edit Text than text view is not updating with new key.
How to reload Activity with updated resources, without restarting the app?
Using Android Jetpack with AppCompatActivity
, the AppCompatDelegateImpl
tries to inflate a layout file (subDecor) in createSubDecor():773
. Normally a PhoneLayoutInflater
would be used at this point. With Restring a RestringLayoutInflater
is used, which fails to get a non null field for "mConstructorArgs"
in createCustomViewInternal(View parent, View view, String name, Context viewContext, AttributeSet attrs):125
by calling ReflectionUtils.getField(LayoutInflater.class, "mConstructorArgs")
. Therefore null
is passed as the field
parameter to ReflectionUtils.getValue(field Field, obj Object))
, which throws a NullPointerException
.
Hi, I found a weakness in this class, if I get content serialize like this:
"dashboard_height_btn=Height & weight,profile_missing_username_error=Username cannot be empty,absence_string=Absence from school/work,home_about_text_body=
IPOPI is the Association of national patient organisations (NMOs) dedicated to improving awareness,, access to early diagnosis and optimal treatments for primary immunodeficiency patients worldwide through global collaboration.
IPOPI has an increasing membership and represents NMOs spread across all continents.
IPOPI came into being in 1992. Since then,, it has been working towards the 4 following ambitious objectives:
1 - Promoting early diagnosis & ensuring optimal access to care
2 - Developing,, strengthening and supporting National Member Organisations (NMOs)
3 - Raising PID awareness globally
4 - Stimulating stakeholder collaboration
IPOPI is a charity registered in the United Kingdom and under UK Charity Law.
Should you wish to get in contact with IPOPI,, please send an email to [email protected]
IPOPI online
>The best way to learn more about IPOPI is our website www.ipopi.org. There you can find everything regarding IPOPI’s activities,, members’ contacts,, the IPOPI PID Map,, etc.
>Follow IPOPI on social medias: Facebook,, Twitter,, LinkedIn
in method deserializeKeyValues line 81 I get items:
I suppose the error is in line 93 .append(item.getValue().replaceAll(",", ",,")), I suggest to use somethings like this .append(item.getValue().replaceAll(",", "*$")) to not create empty elements in items list that in the end result as crash (java.lang.ArrayIndexOutOfBoundsException)
some logs i m facing
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2609)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:63)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.createCustomViewInternal(android.view.View, android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:197)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.access$100(com.ice.restring.RestringLayoutInflater, android.view.View, android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:26)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater$PrivateWrapperFactory2.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:220)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater$FactoryMerger.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:189)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:777)
2020-05-25 10:09:56.321 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (RestringLayoutInflater.java:117)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:749)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:659)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:552)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.rcs.dynamiclayoutapp.MainActivity.onCreate(android.os.Bundle) (MainActivity.kt:61)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.os.Looper.loop() (Looper.java:154)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.rcs.dynamiclayoutapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.rcs.dynamiclayoutapp-1/lib/x86, /system/lib, /vendor/lib]]
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2609)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:63)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.createCustomViewInternal(android.view.View, android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:197)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.access$100(com.ice.restring.RestringLayoutInflater, android.view.View, android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:26)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater$PrivateWrapperFactory2.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (RestringLayoutInflater.java:220)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater$FactoryMerger.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:189)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:777)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View com.ice.restring.RestringLayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (RestringLayoutInflater.java:117)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:749)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:659)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:552)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.rcs.dynamiclayoutapp.MainActivity.onCreate(android.os.Bundle) (MainActivity.kt:61)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2020-05-25 10:09:56.322 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.os.Looper.loop() (Looper.java:154)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
2020-05-25 10:09:56.323 27378-27378/com.rcs.dynamiclayoutapp I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
2020-05-25 10:09:56.357 27378-27378/com.rcs.dynamiclayoutapp W/art: Before Android 4.1, method int androidx.appcompat.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
Hey Hamidness, nice library.
Not really an issue - more of a question. Are you planning to implement handling of quantity (plural) strings?
And what about the ones that have to have a flag beside their name, for example a formatted string:
<string name="all" formatted="false">Amount: %.2f%n for %d days</string>
@hamidness I have a lot of problems with this library in production, and can post issuses here with detailed information, or even create some pull requests but the question is:
Do you plan to continue support of this library?
If yes, let me know, so I can start working on it.
If no, let me know too, and I will think what to do.
Thanks.
Application.java
Restring.init(this, new RestringConfig.Builder().persist(false).build());
BaseActivity.java
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(Restring.wrapContext(newBase));
}
HomeActivity.java
Restring.setStrings(aLocale, aStringStringMap);
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:764)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:92)
at android.widget.PopupWindow.invokePopup(PopupWindow.java:1429)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1203)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1170)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.