Android Open Source - luminous Location Fragment






From Project

Back to project page luminous.

License

The source code is released under:

GNU General Public License

If you think the Android project luminous 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 de.denisulmer.luminous.v2;
/*  ww  w . j ava  2s .  com*/
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.ListView;
import android.widget.TextView;

import java.util.List;

public class LocationFragment extends Fragment
{
    private String mTitle;

    public static LocationFragment newInstance(String location)
    {
        LocationFragment locationFragment = new LocationFragment();
        locationFragment.setTitle(location);
        return locationFragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        View view = inflater.inflate(R.layout.locationfragment_layout, container, false);
        ListView listView = (ListView) view.findViewById(R.id.locationfragment_listview);
        List<Device> devicesInLocation = Core.getDevicesForLocation(mTitle);
        listView.setAdapter(new DeviceListAdapter(Core.getMainActivity(), R.layout.listview_row_socket, devicesInLocation));
        return view;
    }

    public String getTitle()
    {
        return mTitle;
    }

    public void setTitle(String s)
    {
        this.mTitle = s;
    }
}




Java Source Code List

de.denisulmer.luminous.v2.BackgroundTask.java
de.denisulmer.luminous.v2.Core.java
de.denisulmer.luminous.v2.DeviceListAdapter.java
de.denisulmer.luminous.v2.Device.java
de.denisulmer.luminous.v2.LocationFragment.java
de.denisulmer.luminous.v2.LocationPageAdapter.java
de.denisulmer.luminous.v2.MainActivity.java
de.denisulmer.luminous.v2.SetupActivity.java