wear added viktoria's design

This commit is contained in:
AdrianLxM 2017-02-13 17:48:11 +01:00
parent 56e5fae27d
commit f0fc3f6688
2 changed files with 73 additions and 4 deletions

View file

@ -26,8 +26,7 @@ public class ViewSelectorActivity extends Activity {
} else if (design == 3) { } else if (design == 3) {
return LayoutInflater.from(getApplicationContext()).inflate(R.layout.action_editplusminus_item_quicklefty, container, false); return LayoutInflater.from(getApplicationContext()).inflate(R.layout.action_editplusminus_item_quicklefty, container, false);
} else if (design == 4) { } else if (design == 4) {
//TODO: LadyViktoria: Add your design return LayoutInflater.from(getApplicationContext()).inflate(R.layout.action_editplusminus_item_viktoria, container, false);
return LayoutInflater.from(getApplicationContext()).inflate(R.layout.action_editplusminus_item, container, false);
} }
//default //default
@ -40,8 +39,9 @@ public class ViewSelectorActivity extends Activity {
int design = Integer.parseInt(sharedPrefs.getString("input_design", "1")); int design = Integer.parseInt(sharedPrefs.getString("input_design", "1"));
if (design == 4){ if (design == 4){
//TODO: LadyViktoria: Add your design label //@LadyViktoria: Here the label can be set differently, if you like.
final TextView textView = (TextView) view.findViewById(R.id.label);
textView.setText(labelText);
} else { } else {
final TextView textView = (TextView) view.findViewById(R.id.label); final TextView textView = (TextView) view.findViewById(R.id.label);
textView.setText(labelText); textView.setText(labelText);

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="left|center_vertical"
android:gravity="center"
android:rotation="90"
android:text="label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="25sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical|center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/plusbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:backgroundTint="#ffffff"
android:src="@drawable/ic_action_add"
android:tint="#ffffff" />
<EditText
android:id="@+id/amountfield"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical|center_horizontal"
android:background="@android:color/transparent"
android:cursorVisible="false"
android:gravity="center_vertical|center_horizontal"
android:inputType="numberDecimal"
android:minWidth="50dp"
android:padding="10dp"
android:text="112"
android:textSize="45sp" />
<ImageView
android:id="@+id/minusbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:backgroundTint="#ffffff"
android:src="@drawable/ic_action_minus"
android:tint="#ffffff" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>