View Single Post
Old 09-17-2012, 12:56 PM   #83
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by ihor View Post
I am glad it is working.

I see that it will be necessary to create a version for every version of firmware. This is the reason - see attachment.

The code of MobiReader and framework are similar, so first I though it would be enough to create one file with _en_US in the end....

But this won't be enough, since import classes have different obfuscated name.
So, it will be a routine process.
That one is easy to solve. Just remove *everything* in the overriding resource bundle *except* for the entry/entries that you actually want to replace.

Unless you're extremely unlucky, this will - as a side effect - also trim down the required imports to maybe three or four (common) classes.

EDIT: Oh, I see that you did just that. But this also means that your "import conflicts" should have gone away. In fact, there is only one import left:

Spoiler:

Code:
package com.amazon.ebook.framework.resources;

import java.util.ListResourceBundle;

public class UIResources_en_US extends ListResourceBundle
{

    public UIResources_en_US()
    {
    }

    public Object[][] getContents()
    {
        return f;
    }

    static final Object f[][] = {
        {
            "fontmenu.default.font.size.list", new int[] {
                21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 
                31
            }
        }
    };

}


And a final hint: you don't need two separate jar files. You can put both classes into the same file, of course.

Last edited by ixtab; 09-17-2012 at 01:07 PM.
ixtab is offline   Reply With Quote