Skip to content

Commit

Permalink
Fixing small bugs which occur on older android versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arazabishov committed Jul 11, 2016
1 parent ce494bc commit f8e9da1
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ public PickerItemAdapter(Context context, Picker picker) {
this.inflater = LayoutInflater.from(context);
this.currentPicker = checkNotNull(picker, "Picker must not be null");
this.originalPickers = currentPicker.getChildren();
this.filteredPickers = new ArrayList<Picker>(currentPicker.getChildren());
this.filteredPickers = new ArrayList<>(currentPicker.getChildren());
}

public PickerItemAdapter(Context context) {
this.context = checkNotNull(context, "context must not be null!");
this.inflater = LayoutInflater.from(context);
this.originalPickers = new ArrayList<Picker>();
this.filteredPickers = new ArrayList<Picker>();
this.originalPickers = new ArrayList<>();
this.filteredPickers = new ArrayList<>();
}

public void setOnPickerItemClickListener(OnPickerItemClickListener onPickerItemClickListener) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@
import org.dhis2.mobile.io.models.Field;

import org.dhis2.mobile.R;
import org.dhis2.mobile.ui.pickers.DatePickerDialog;
import org.dhis2.mobile.ui.pickers.DatePickerDialog.OnDateSetListener;
import org.dhis2.mobile.ui.fragments.DatePickerDialog;
import org.dhis2.mobile.ui.fragments.DatePickerDialog.OnDateSetListener;
import org.joda.time.LocalDate;

import org.dhis2.mobile.ui.adapters.dataEntry.FieldAdapter;

import android.content.Context;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.dhis2.mobile.ui.adapters.PickerAdapter;
import org.dhis2.mobile.ui.adapters.PickerAdapter.OnPickerListChangeListener;
import org.dhis2.mobile.ui.models.Picker;
import org.dhis2.mobile.ui.pickers.PeriodPicker;
import org.dhis2.mobile.utils.PrefUtils;
import org.dhis2.mobile.utils.TextFileUtils;
import org.dhis2.mobile.utils.ToastManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dhis2.mobile.ui.pickers;
package org.dhis2.mobile.ui.fragments;

/*
* Copyright (C) 2007 The Android Open Source Project
Expand Down Expand Up @@ -35,7 +35,6 @@
* guide.</p>
*/
public class DatePickerDialog extends AlertDialog implements OnDateChangedListener {

private static final String YEAR = "year";
private static final String MONTH = "month";
private static final String DAY = "day";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dhis2.mobile.ui.pickers;
package org.dhis2.mobile.ui.fragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
Expand Down Expand Up @@ -36,7 +36,9 @@ public static PeriodPicker newInstance(String title, String periodType, int open
arguments.putString(ARG_TITLE, title);
arguments.putString(ARG_PERIOD_TYPE, periodType);
arguments.putInt(ARG_OPEN_FUTURE_PERIOD, openFuturePeriod);

periodPicker.setArguments(arguments);
periodPicker.setStyle(DialogFragment.STYLE_NO_TITLE, 0);

return periodPicker;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:minHeight="428dp"
android:minWidth="296dp"
android:orientation="vertical">
Expand All @@ -51,6 +52,7 @@
<ListView
android:id="@+id/listview_picker_items"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:cacheColorHint="@android:color/transparent"/>

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">

<include layout="@layout/appbar" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dialog_listview_item_selector"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal" >

<org.dhis2.mobile.ui.views.FontTextView
Expand Down

0 comments on commit f8e9da1

Please sign in to comment.