From 2cf450f48283bcf1452cb717b7ae3a9f0c729105 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 24 Apr 2013 14:48:29 +0900 Subject: [PATCH] [PB6] Encapsulate the buttons into a view Handling buttons directly in the preference causes large problems of code readability and interface. It's better to have a class to manage the buttons and their animations separately. This is feature-equivalent, and mostly delegates stuff for now. Bug: 7600384 Change-Id: Ia8da0ec68ffac84fc1d65e1760539a87a73fa776 --- java/res/layout/dictionary_line.xml | 20 +++--- .../dictionarypack/ButtonSwitcher.java | 69 +++++++++++++++++++ .../dictionarypack/WordListPreference.java | 38 +++------- 3 files changed, 91 insertions(+), 36 deletions(-) create mode 100644 java/src/com/android/inputmethod/dictionarypack/ButtonSwitcher.java diff --git a/java/res/layout/dictionary_line.xml b/java/res/layout/dictionary_line.xml index a8d15ab73..9eeea697e 100644 --- a/java/res/layout/dictionary_line.xml +++ b/java/res/layout/dictionary_line.xml @@ -71,14 +71,18 @@ -