Android Open Source - slidingdebugmenu Module Simple Property






From Project

Back to project page slidingdebugmenu.

License

The source code is released under:

Apache License

If you think the Android project slidingdebugmenu 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 co.lemonlabs.android.slidingdebugmenu.views;
/*from ww w .j ava2  s  .com*/
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.TextView;

import co.lemonlabs.android.slidingdebugmenu.R;

/**
 * Simple module property containing
 * two text views
 * <p/>
 * Created by balysv on 10/01/14.
 * www.lemonlabs.co
 */
public class ModuleSimpleProperty extends FrameLayout {

    private TextView mPropertyName;
    private TextView mPropertyValue;

    public ModuleSimpleProperty(Context context, String propertyName) {
        this(context);
        setPropertyName(propertyName);
    }

    public ModuleSimpleProperty(Context context, int propertyResId) {
        this(context);
        setPropertyName(propertyResId);
    }

    public ModuleSimpleProperty(Context context) {
        super(context);
        inflate();
    }

    private void inflate() {
        LayoutInflater.from(getContext()).inflate(R.layout.sdm__module_property_simple, this, true);
        mPropertyName = (TextView) findViewById(R.id.sdm__module_property_name);
        mPropertyValue = (TextView) findViewById(R.id.sdm__module_property_value);
    }

    /**
     * Set name of property
     *
     * @param name
     */
    public void setPropertyName(String name) {
        mPropertyName.setText(name);
    }

    /**
     * Set name of property
     *
     * @param resId
     */
    public void setPropertyName(int resId) {
        mPropertyName.setText(resId);
    }

    /**
     * Set property value
     *
     * @param name
     */
    public void setPropertyValue(String name) {
        mPropertyValue.setText(name);
    }

    /**
     * Set property value
     *
     * @param resId
     */
    public void setPropertyValue(int resId) {
        mPropertyValue.setText(resId);
    }
}




Java Source Code List

co.lemonlabs.android.slidingdebugmenu.SlidingDebugMenuModule.java
co.lemonlabs.android.slidingdebugmenu.SlidingDebugMenu.java
co.lemonlabs.android.slidingdebugmenu.controllers.LocationController.java
co.lemonlabs.android.slidingdebugmenu.controllers.NetworkController.java
co.lemonlabs.android.slidingdebugmenu.demo.DemoActivity.java
co.lemonlabs.android.slidingdebugmenu.demo.DemoModule.java
co.lemonlabs.android.slidingdebugmenu.demo.LocaleModule.java
co.lemonlabs.android.slidingdebugmenu.modules.BuildModule.java
co.lemonlabs.android.slidingdebugmenu.modules.LocationModule.java
co.lemonlabs.android.slidingdebugmenu.modules.LogModule.java
co.lemonlabs.android.slidingdebugmenu.modules.MenuModule.java
co.lemonlabs.android.slidingdebugmenu.modules.NetworkModule.java
co.lemonlabs.android.slidingdebugmenu.modules.events.LocationEvent.java
co.lemonlabs.android.slidingdebugmenu.modules.events.NetworkChangeEvent.java
co.lemonlabs.android.slidingdebugmenu.receivers.NetworkReceiver.java
co.lemonlabs.android.slidingdebugmenu.util.Log.java
co.lemonlabs.android.slidingdebugmenu.views.ModuleSimpleProperty.java
co.lemonlabs.android.slidingdebugmenu.views.ModuleSpinnerProperty.java
co.lemonlabs.android.slidingdebugmenu.views.ModuleTitle.java