Просмотр исходного кода

GUI Layouting (Main Options Menu)

master
gitsvn 12 лет назад
Родитель
Сommit
98cded3601

+ 2
- 3
res/layout/rbs_spinner_item.xml Просмотреть файл

@@ -9,16 +9,15 @@
<ch.spherIC.recurvebowsight.components.FontTextView
android:id="@+id/spinner_item_view"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="bottom|left"
android:lines="1"
android:paddingLeft="2dp"
android:text="FontTextView"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:textColor="@color/white"
android:textSize="18sp"
android:typeface="sans"
app:font="@string/TitilliumWeb_Regular" />
<ImageView

+ 2
- 6
src/ch/spherIC/recurvebowsight/components/FontArrayAdapter.java Просмотреть файл

@@ -5,8 +5,6 @@ package ch.spherIC.recurvebowsight.components;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -54,19 +52,17 @@ public class FontArrayAdapter<O extends Object> extends ArrayAdapter<O> {
LayoutInflater inflater = getLayoutInflater();
View spinnerItem = inflater.inflate(R.layout.rbs_spinner_item, parent, false);
TextView textView = (TextView) spinnerItem.findViewById(R.id.spinner_item_view);
FontTextView textView = (FontTextView) spinnerItem.findViewById(R.id.spinner_item_view);
ImageView checkBoxView = (ImageView) spinnerItem.findViewById(R.id.spinner_item_checkBox);
textView.setText(getItem(position).toString());
spinnerItem.setBackgroundColor(getContext().getResources().getColor(R.color.black));
if (this.parentSpinner.getSelectedItemPosition() == position) {
textView.setFont(getContext(), "fonts/TitilliumWeb-Bold.ttf");
textView.setTextColor(getContext().getResources().getColor(R.color.android_blue_dark));
textView.setTypeface(null, Typeface.BOLD);
checkBoxView.setVisibility(View.VISIBLE);
} else {
textView.setTextColor(getContext().getResources().getColor(R.color.white));
textView.setTypeface(null, Typeface.NORMAL);
checkBoxView.setVisibility(View.INVISIBLE);
}

Загрузка…
Отмена
Сохранить