From 17b034c1c92cccc46127ccab75e746c4571e6a69 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Thu, 18 Jul 2013 17:20:19 +0400 Subject: [PATCH] translators list --- android-app/res/layout/about_fragment.xml | 73 +++++++++++-------- .../about/CalculatorAboutFragment.java | 15 +++- 2 files changed, 54 insertions(+), 34 deletions(-) diff --git a/android-app/res/layout/about_fragment.xml b/android-app/res/layout/about_fragment.xml index 9d79608b..80302de9 100644 --- a/android-app/res/layout/about_fragment.xml +++ b/android-app/res/layout/about_fragment.xml @@ -23,42 +23,53 @@ --> + a:orientation="vertical" + a:layout_width="fill_parent" + a:layout_height="fill_parent" + a:background="#ff000000"> + + + + + a:orientation="vertical"> - + - + + + + + \ No newline at end of file diff --git a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java b/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java index cd8ccc07..bc8ae5ed 100644 --- a/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java +++ b/android-app/src/main/java/org/solovyev/android/calculator/about/CalculatorAboutFragment.java @@ -26,11 +26,13 @@ import android.os.Bundle; import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.TextView; - import org.solovyev.android.calculator.CalculatorFragment; import org.solovyev.android.calculator.CalculatorFragmentType; import org.solovyev.android.calculator.R; +import static android.view.View.GONE; +import static org.solovyev.common.text.Strings.isEmpty; + /** * User: serso * Date: 12/24/11 @@ -46,7 +48,14 @@ public class CalculatorAboutFragment extends CalculatorFragment { public void onViewCreated(View root, Bundle savedInstanceState) { super.onViewCreated(root, savedInstanceState); - final TextView about = (TextView) root.findViewById(R.id.aboutTextView); - about.setMovementMethod(LinkMovementMethod.getInstance()); + final TextView aboutTextView = (TextView) root.findViewById(R.id.cpp_about_textview); + aboutTextView.setMovementMethod(LinkMovementMethod.getInstance()); + + final TextView translatorsTextTextView = (TextView) root.findViewById(R.id.cpp_about_translators_text); + final TextView translatorsTextView = (TextView) root.findViewById(R.id.cpp_about_translators); + if(isEmpty(translatorsTextView.getText())) { + translatorsTextTextView.setVisibility(GONE); + translatorsTextView.setVisibility(GONE); + } } }