translators list

This commit is contained in:
Sergey Solovyev 2013-07-18 17:20:19 +04:00
parent c5464f4190
commit 17b034c1c9
2 changed files with 54 additions and 34 deletions

View File

@ -36,29 +36,40 @@
a:padding="6dp" a:padding="6dp"
a:src="@drawable/logo" /> a:src="@drawable/logo" />
<TextView <ScrollView
a:id="@+id/aboutTextView"
a:text="@string/c_about_content"
a:layout_height="fill_parent"
a:layout_width="fill_parent" a:layout_width="fill_parent"
a:layout_gravity="top|center_horizontal" a:layout_height="fill_parent"
a:layout_weight="1" a:layout_weight="1">
a:scrollbars="vertical"
<LinearLayout
a:layout_width="fill_parent"
a:layout_height="wrap_content"
a:orientation="vertical">
<TextView
a:id="@+id/cpp_about_textview"
a:text="@string/c_about_content"
a:layout_height="match_parent"
a:layout_width="match_parent"
style="@style/cpp_about_style" /> style="@style/cpp_about_style" />
<!--
a:scrollbarFadeDuration="0" is not support in android_1.6_compatibility
<TextView <TextView
a:id="@+id/aboutTextView" a:id="@+id/cpp_about_translators_text"
a:text="@string/c_copyright" a:text="@string/cpp_translators_text"
a:layout_height="fill_parent" a:layout_height="wrap_content"
a:layout_width="fill_parent" a:layout_width="match_parent"
a:layout_gravity="top|center_horizontal" a:paddingBottom="0dp"
a:layout_weight="1" style="@style/cpp_about_style" />
a:scrollbars="vertical"
a:scrollbarFadeDuration="0" <TextView
style="@style/about_style"/> a:id="@+id/cpp_about_translators"
--> a:text="@string/cpp_translators_list"
a:layout_height="wrap_content"
a:layout_width="match_parent"
a:paddingTop="0dp"
style="@style/cpp_about_style" />
</LinearLayout> </LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -26,11 +26,13 @@ import android.os.Bundle;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import org.solovyev.android.calculator.CalculatorFragment; import org.solovyev.android.calculator.CalculatorFragment;
import org.solovyev.android.calculator.CalculatorFragmentType; import org.solovyev.android.calculator.CalculatorFragmentType;
import org.solovyev.android.calculator.R; import org.solovyev.android.calculator.R;
import static android.view.View.GONE;
import static org.solovyev.common.text.Strings.isEmpty;
/** /**
* User: serso * User: serso
* Date: 12/24/11 * Date: 12/24/11
@ -46,7 +48,14 @@ public class CalculatorAboutFragment extends CalculatorFragment {
public void onViewCreated(View root, Bundle savedInstanceState) { public void onViewCreated(View root, Bundle savedInstanceState) {
super.onViewCreated(root, savedInstanceState); super.onViewCreated(root, savedInstanceState);
final TextView about = (TextView) root.findViewById(R.id.aboutTextView); final TextView aboutTextView = (TextView) root.findViewById(R.id.cpp_about_textview);
about.setMovementMethod(LinkMovementMethod.getInstance()); 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);
}
} }
} }