I
I
Ivan Kolesnik2016-07-04 23:06:51
Java
Ivan Kolesnik, 2016-07-04 23:06:51

How to dynamically change XML in an Android application?

Essence. I am engaged in a more adequate implementation of 3D Press on Meizu Pro 6, very successfully if I make a static application. What is the point: I screwed the "Favorites" items to the regular dialer, thanks to which you can call one or another subscriber directly from the 3D Press menu - https://www.youtube.com/watch?v=N_FIgy2rE4M . The problem arose when I wanted to make it possible to add and remove these contacts manually, with pens, directly from the application, because how to edit, in fact, the resources (which are readonly in android) in which menu lines are stored? Example:

<launcher_menu xmlns:android="http://schemas.android.com/apk/res/android">
    <menu android:title="@string/STRING1" data="flyme_3dtouch://com.navikolus.forcetouch/call1" icon="" />
    <menu android:title="@string/STRING2" data="flyme_3dtouch://com.navikolus.forcetouch/call2" icon="" />
</launcher_menu>

In these very "android: title" links to lines are stored. They cannot be entered even directly - NULL remains instead of text in the launcher. How to change them directly from the code? Or even implement this dynamic? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question