Simplify the spinner styling.
This commit is contained in:
parent
f7b883a4ce
commit
a6a5eff5b6
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
|
|
||||||
**
|
|
||||||
** Copyright 2006, The Android Open Source Project
|
|
||||||
**
|
|
||||||
** 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.
|
|
||||||
*/
|
|
||||||
style="@style/spinnerStyle"
|
|
||||||
-->
|
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
style="@style/spinnerStyle"
|
|
||||||
android:id="@android:id/text1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:ellipsize="marquee" />
|
|
8
android/res/values-v11/styles.xml
Normal file
8
android/res/values-v11/styles.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="spinnerStyle" parent="Widget.Sherlock.TextView.SpinnerItem">
|
||||||
|
<item name="android:textSize">22dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
@ -12,15 +12,17 @@
|
|||||||
<item name="android:gravity">right</item>
|
<item name="android:gravity">right</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme" parent="Theme.Sherlock"/>
|
<style name="AppTheme" parent="Theme.Sherlock">
|
||||||
|
<item name="android:spinnerItemStyle">@style/spinnerStyle</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.NoActionBar" parent="AppTheme">
|
<style name="AppTheme.NoActionBar" parent="AppTheme">
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="spinnerStyle" parent="@android:style/Widget.TextView.SpinnerItem">
|
<style name="spinnerStyle" parent="Widget.Sherlock.TextView.SpinnerItem">
|
||||||
<item name="android:textSize">22dp</item>
|
<item name="android:textSize">26dp</item>
|
||||||
<item name="android:textColor">#000000</item>
|
<item name="android:textColor">#000000</item>
|
||||||
<item name="android:layout_height">30dp</item>
|
<item name="android:layout_height">30dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
@ -8,7 +8,7 @@ import android.widget.ArrayAdapter;
|
|||||||
public class MotorConfigSpinnerAdapter extends ArrayAdapter<String> {
|
public class MotorConfigSpinnerAdapter extends ArrayAdapter<String> {
|
||||||
|
|
||||||
public MotorConfigSpinnerAdapter(Context context, Rocket rocket) {
|
public MotorConfigSpinnerAdapter(Context context, Rocket rocket) {
|
||||||
super(context, R.layout.simple_spinner_item);
|
super(context, android.R.layout.simple_spinner_item);
|
||||||
|
|
||||||
String[] motorConfigs = rocket.getMotorConfigurationIDs();
|
String[] motorConfigs = rocket.getMotorConfigurationIDs();
|
||||||
|
|
||||||
|
@ -88,14 +88,14 @@ public class SimulationSeriesDialog extends DialogFragment {
|
|||||||
selectableSeries.add(fdt);
|
selectableSeries.add(fdt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ArrayAdapter<FlightDataType> serieses = new ArrayAdapter<FlightDataType>(getActivity(),R.layout.simple_spinner_item,selectableSeries) {
|
ArrayAdapter<FlightDataType> serieses = new ArrayAdapter<FlightDataType>(getActivity(),android.R.layout.simple_spinner_item,selectableSeries) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
View v = convertView;
|
View v = convertView;
|
||||||
if ( v == null ) {
|
if ( v == null ) {
|
||||||
LayoutInflater li = inflater;
|
LayoutInflater li = inflater;
|
||||||
v = li.inflate(R.layout.simple_spinner_item,null);
|
v = li.inflate(android.R.layout.simple_spinner_item,null);
|
||||||
}
|
}
|
||||||
FlightDataType fdt = this.getItem(position);
|
FlightDataType fdt = this.getItem(position);
|
||||||
((TextView)v.findViewById(android.R.id.text1)).setText( fdt.toString() );
|
((TextView)v.findViewById(android.R.id.text1)).setText( fdt.toString() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user