Android Open Source - ArduinoRGB-Controller Fader Fragment






From Project

Back to project page ArduinoRGB-Controller.

License

The source code is released under:

MIT License

If you think the Android project ArduinoRGB-Controller listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package dk.cmol.arduinorgb_controller;
/*from w ww  .ja  v  a2  s  . co m*/
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.NumberPicker;

public class FaderFragment extends Fragment {

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_fader, container,
        false);

    // Add min and max to number picker elements
    NumberPicker[] nps = {(NumberPicker) rootView.findViewById(R.id.numberPicker1),
        (NumberPicker) rootView.findViewById(R.id.numberPicker2),
        (NumberPicker) rootView.findViewById(R.id.numberPicker3)
    };
    
    for (int i = 0; i < nps.length; i++) {
      nps[i].setMaxValue(255);
      nps[i].setMinValue(0);
    }
    

    return rootView;
  }
}




Java Source Code List

dk.cmol.arduinorgb_controller.ArduinoRGBActivity.java
dk.cmol.arduinorgb_controller.ArduinoSocket.java
dk.cmol.arduinorgb_controller.ColorDotsFragment.java
dk.cmol.arduinorgb_controller.FaderFragment.java
dk.cmol.arduinorgb_controller.GyroFragment.java
dk.cmol.arduinorgb_controller.LampParser.java
dk.cmol.arduinorgb_controller.MenuPagerAdapter.java
dk.cmol.arduinorgb_controller.SettingsActivity.java
dk.cmol.arduinorgb_controller.SettingsFragment.java
dk.cmol.arduinorgb_controller.SliderFragment.java