Avisos

ROMs y desarrollo Nexus 4 ROMs y desarrollo Nexus 4

Respuesta
 
Herramientas
  #1  
Viejo 07/12/13, 12:56:42
Array

[xs_avatar]
Javier.d Javier.d no está en línea
Nuevo cocinero
 
Fecha de registro: may 2012
Localización: Madrid
Mensajes: 722
Modelo de smartphone: OnePlus One/ Nexus 4
Tu operador: Tuenti Movil
[AYUDA] Cocineros

Buenas, estoy trabajando en una rom basada en slim, y me gustaría añadir las animaciones listview de omni, pero me da un error que no consigo solucionar .
En primer lugar, los commits son estos :
https://gerrit.omnirom.org/#/c/2863
https://gerrit.omnirom.org/#/c/2862

En frameworks/base no da ningún error, el problema está en Settings, os voy a poner aquí lo que he ido haciendo con las recomendaciones de compañeros, como AlvaroOrduna (Muchas gracias ) (antes de nada, mi github es http://github.com/DiavexRom ):

En primer lugar aplico este cherry-pick: https://gerrit.omnirom.org/#/c/2862

Vale, lo que añade en res/values/custom_arrays.xml lo he añadido a slim_arrays.xml, copiando y pegando, y he he hecho git rm a custom_arrys.xml

Lo que añade en custom_strings.xml lo he añadido en slim_strings.xml, y he hecho lo mismo que antes

Lo que añade en res/xml/bars_and_menus_settings.xml lo he añadido a res/xml/slim_interface_settings.xml, y he hecho git rm del primero.

Ahora es donde viene el problema.
Lo que añade en src/org/omnirom/omnigears/BarsAndMenusSettings.java y lo he intentando añadir a src/com/android/settings/slim/InterfaceSettings.java
El problema está en que el de omni tiene muchas cosas que el mío no tiene, así que ahí puse esto, que me pasó Alvaro:
(Click para mostrar/ocultar)
Código:
/*
 * Copyright (C) 2013 SlimRoms
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.settings.slim;

import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.preference.Preference.OnPreferenceChangeListener;
import android.provider.MediaStore;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;

import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils;

public class InterfaceSettings extends SettingsPreferenceFragment {

    private static final String KEY_LISTVIEW_ANIMATION = "listview_animation";
    private static final String KEY_LISTVIEW_INTERPOLATOR = "listview_interpolator";

    private ListPreference mListViewAnimation;
    private ListPreference mListViewInterpolator;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.slim_interface_settings);

        //ListView Animations

        mListViewAnimation = (ListPreference) prefSet.findPreference(KEY_LISTVIEW_ANIMATION);
			        String listViewAnimation = Settings.System.getString(resolver, Settings.System.LISTVIEW_ANIMATION);
        if (listViewAnimation != null) {
             mListViewAnimation.setValue(listViewAnimation);
        }
        mListViewAnimation.setOnPreferenceChangeListener(this);

        mListViewInterpolator = (ListPreference) prefSet.findPreference(KEY_LISTVIEW_INTERPOLATOR);
        String listViewInterpolator = Settings.System.getString(resolver, Settings.System.LISTVIEW_INTERPOLATOR);
        if (listViewInterpolator != null) {
             mListViewInterpolator.setValue(listViewInterpolator);
        }
        mListViewInterpolator.setOnPreferenceChangeListener(this);
    }

    @Override
    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
        return true;
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    public boolean onPreferenceChange(Preference preference, Object objValue) {
        ContentResolver resolver = getActivity().getContentResolver();
        if (preference == mListViewAnimation) {
            String value = (String) objValue;
            Settings.System.putString(resolver, Settings.System.LISTVIEW_ANIMATION, value);
        } else if (preference == mListViewInterpolator) {
            String value = (String) objValue;
            Settings.System.putString(resolver, Settings.System.LISTVIEW_INTERPOLATOR, value);
        } else {
            return false;
        }

        return true;
    }
}

Y después, al compilar, me daba este error:
Código:
packages/apps/Settings/res/xml/slim_interface_settings.xml:38: error: Error: No resource found that matches the given name (at 'title' with value '@string/bars_and_menus_category_system_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'dialogTitle' with value '@string/listview_animation_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'title' with value '@string/listview_animation_title').
make: *** [/home/javierd/android/slim/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Se espera a que terminen otras tareas....
javierd@javierd-GE70-2OC-2OD-2OE ~/android/slim $
Así que cambié bars_and_menus_category_system_title por eso interface_settings_title , que es lo que sale al principio, os paso el archivo : https://www.dropbox.com/s/btiga0bt71...e_settings.xml

Y me da este error, que ya no se como solucionar:
(Click para mostrar/ocultar)
Código:
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'dialogTitle' with value '@string/listview_animation_title').
packages/apps/Settings/res/xml/slim_interface_settings.xml:42: error: Error: No resource found that matches the given name (at 'title' with value '@string/listview_animation_title').
make: *** [/home/javierd/android/slim/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Se espera a que terminen otras tareas....


¿Alguien sabe como puedo arreglarlo?
Muchísimas gracias a todos, y siento que os hayais tenido que leer el tocho entero
Responder Con Cita


  #2  
Viejo 07/12/13, 15:42:47
Array

[xs_avatar]
Javier.d Javier.d no está en línea
Nuevo cocinero
 
Fecha de registro: may 2012
Localización: Madrid
Mensajes: 722
Modelo de smartphone: OnePlus One/ Nexus 4
Tu operador: Tuenti Movil
¿¿¿Nadie???
Responder Con Cita
Respuesta

Estás aquí
Regresar   Portal | Indice > Otras marcas y modelos de smartphones de venta en España > LG > Otros smartphones antiguos de LG > Nexus 4 > ROMs y desarrollo Nexus 4



Hora actual: 22:20:41 (GMT +1)



User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.

Contactar por correo / Contact by mail / 邮件联系 /