Android Open Source - AndroidGraph View Manipulators






From Project

Back to project page AndroidGraph.

License

The source code is released under:

MIT License

If you think the Android project AndroidGraph 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 com.nimble.android_graph.generics;
/*  w  w w .ja va  2s.c  om*/
import android.content.Context;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;

/**
 * Various functions for manipulating views.
 * @author Michael Leith
 * @since 10/07/2014.
 * @version 1.0
 */
public class ViewManipulators {

    /**
     * Adds a new EditText to the LinearLayout with the given parameters.
     * @param layout LinearLayout
     * @param context Context
     * @param hint CharSequence/String
     * @param inputType int
     * @param params LinearLayout.LayoutParams
     * @return EditText
     */
    public static final EditText addEditText_LinearLayout(LinearLayout layout, Context context, CharSequence hint,
                                                           int inputType, LinearLayout.LayoutParams params)
    {
        EditText editText = new EditText(context);
        editText.setInputType(inputType);
        editText.setHint(hint);
        layout.addView(editText, params);
        return editText;
    }

    public static final void toastOnFalse(boolean result, Context context, String msg,int duration)
    {
        if( !result )
            Toast.makeText(context, msg, duration).show();
    }
}




Java Source Code List

Nimble.com.androidgraph.ApplicationTest.java
com.nimble.android_graph.Activities.FragmentList.java
com.nimble.android_graph.Activities.GraphActivity.java
com.nimble.android_graph.Activities.GraphFragment.java
com.nimble.android_graph.Activities.GroupsFragment.java
com.nimble.android_graph.Graph.CurveGraph.java
com.nimble.android_graph.Graph.LineGraph.java
com.nimble.android_graph.Graph.Line.java
com.nimble.android_graph.Graph.ScatterGraph.java
com.nimble.android_graph.Graph.SineWave.java
com.nimble.android_graph.Graph_Base.Coord2d.java
com.nimble.android_graph.Graph_Base.GraphDataSettings.java
com.nimble.android_graph.Graph_Base.GraphDrawBackground.java
com.nimble.android_graph.Graph_Base.GraphRelateToScreen.java
com.nimble.android_graph.Graph_Base.GraphThreading.java
com.nimble.android_graph.Graph_Base.GraphTouchEvent.java
com.nimble.android_graph.Graph_Base.GraphViewDimensions.java
com.nimble.android_graph.Graph_Base.GraphView.java
com.nimble.android_graph.Graph_Base.Point.java
com.nimble.android_graph.Graph_Base.Range2d.java
com.nimble.android_graph.Graph.sine_scatter.java
com.nimble.android_graph.generics.Methods.java
com.nimble.android_graph.generics.ViewManipulators.java
com.nimble.android_graph.generics.testingSuite.java