Set background color in plotter

This commit is contained in:
serso 2016-03-24 17:03:04 +01:00
parent 1fe612f63f
commit 30877e1337
2 changed files with 5 additions and 0 deletions

Binary file not shown.

View File

@ -3,6 +3,7 @@ package org.solovyev.android.calculator.plot;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -13,6 +14,7 @@ import org.solovyev.android.calculator.BaseActivity;
import org.solovyev.android.calculator.BaseFragment; import org.solovyev.android.calculator.BaseFragment;
import org.solovyev.android.calculator.R; import org.solovyev.android.calculator.R;
import org.solovyev.android.plotter.Dimensions; import org.solovyev.android.plotter.Dimensions;
import org.solovyev.android.plotter.PlotData;
import org.solovyev.android.plotter.PlotViewFrame; import org.solovyev.android.plotter.PlotViewFrame;
import org.solovyev.android.plotter.Plotter; import org.solovyev.android.plotter.Plotter;
@ -47,6 +49,9 @@ public class PlotActivity extends BaseActivity {
final View view = super.onCreateView(inflater, container, savedInstanceState); final View view = super.onCreateView(inflater, container, savedInstanceState);
ButterKnife.bind(this, view); ButterKnife.bind(this, view);
final PlotData pd = plotter.getPlotData();
pd.axisStyle.backgroundColor = ContextCompat.getColor(getActivity(), R.color.cpp_bg);
plotter.setAxisStyle(pd.axisStyle);
plotView.addControlView(R.id.plot_add_function); plotView.addControlView(R.id.plot_add_function);
plotView.addControlView(R.id.plot_functions); plotView.addControlView(R.id.plot_functions);
plotView.addControlView(R.id.plot_dimensions); plotView.addControlView(R.id.plot_dimensions);