mirror of https://github.com/tasks/tasks
Convert repeat control set to compose
parent
0711176ae2
commit
e450f51f60
@ -1,41 +0,0 @@
|
||||
package org.tasks.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import java.util.List;
|
||||
import org.tasks.R;
|
||||
|
||||
public class HiddenTopArrayAdapter<T> extends ArrayAdapter<T> {
|
||||
|
||||
protected HiddenTopArrayAdapter(Context context, int resources, List<T> objects) {
|
||||
super(context, resources, objects);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(
|
||||
final int position, final View convertView, @NonNull final ViewGroup parent) {
|
||||
View v;
|
||||
|
||||
if (position == 0) {
|
||||
TextView tv = new TextView(getContext());
|
||||
tv.setHeight(0);
|
||||
tv.setVisibility(View.GONE);
|
||||
v = tv;
|
||||
} else {
|
||||
ViewGroup vg =
|
||||
(ViewGroup)
|
||||
LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.simple_spinner_dropdown_item, parent, false);
|
||||
((TextView) vg.findViewById(R.id.text1)).setText(getItem(position).toString());
|
||||
v = vg;
|
||||
}
|
||||
|
||||
parent.setVerticalScrollBarEnabled(false);
|
||||
return v;
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 93 B |
Binary file not shown.
Before Width: | Height: | Size: 96 B |
Binary file not shown.
Before Width: | Height: | Size: 93 B |
Binary file not shown.
Before Width: | Height: | Size: 105 B |
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
** Copyright (c) 2012 Todoroo Inc
|
||||
**
|
||||
** See the file "LICENSE" for the full license governing this code.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/display_row_edit"
|
||||
style="@style/TaskEditTextPrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:gravity="start"
|
||||
android:hint="@string/repeat_option_does_not_repeat"
|
||||
android:textAlignment="viewStart"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/repeatTypeContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/keyline_first"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/repeats_from"
|
||||
android:textAppearance="@style/TextAppearance"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/repeatType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:textColor="@color/text_primary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue