Search in sources :

Example 1 with ActivitySummariesChartFragment

use of nodomain.freeyourgadget.gadgetbridge.activities.ActivitySummariesChartFragment in project Gadgetbridge by Freeyourgadget.

the class ActivityListingDetail method onViewCreated.

@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    int tsFrom = getArguments().getInt("tsFrom");
    int tsTo = getArguments().getInt("tsTo");
    ActivitySession item = (ActivitySession) getArguments().getSerializable("item");
    GBDevice gbDevice;
    gbDevice = getArguments().getParcelable(GBDevice.EXTRA_DEVICE);
    if (gbDevice == null) {
        throw new IllegalArgumentException("Must provide a device when invoking this activity");
    }
    final ActivitySummariesChartFragment activitySummariesChartFragment = new ActivitySummariesChartFragment();
    getChildFragmentManager().beginTransaction().replace(R.id.chartsFragmentHolder, activitySummariesChartFragment).commit();
    activitySummariesChartFragment.setDateAndGetData(gbDevice, tsFrom, tsTo);
    ActivityListingAdapter stepListAdapter = new ActivityListingAdapter(getContext());
    View activityItem = view.findViewById(R.id.activityItemHolder);
    stepListAdapter.fill_item(item, 0, activityItem, null);
}
Also used : ActivitySummariesChartFragment(nodomain.freeyourgadget.gadgetbridge.activities.ActivitySummariesChartFragment) ActivitySession(nodomain.freeyourgadget.gadgetbridge.model.ActivitySession) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View) GBDevice(nodomain.freeyourgadget.gadgetbridge.impl.GBDevice)

Aggregations

View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 ActivitySummariesChartFragment (nodomain.freeyourgadget.gadgetbridge.activities.ActivitySummariesChartFragment)1 GBDevice (nodomain.freeyourgadget.gadgetbridge.impl.GBDevice)1 ActivitySession (nodomain.freeyourgadget.gadgetbridge.model.ActivitySession)1