Android Open Source - Rhybudd View Event Fragment






From Project

Back to project page Rhybudd.

License

The source code is released under:

GNU General Public License

If you think the Android project Rhybudd 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

/*
 * Copyright (C) 2013 - Gareth Llewellyn
 */* w ww  .j  a v  a2s .  c o m*/
 * This file is part of Rhybudd - http://blog.NetworksAreMadeOfString.co.uk/Rhybudd/
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>
 */
package net.networksaremadeofstring.rhybudd;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;


public class ViewEventFragment extends Fragment
{
  int postionInList = 0;
  
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
  {
    postionInList = getArguments().getInt("Position");
        return inflater.inflate(R.layout.view_zenoss_event_fragment, container, false);
    }
    
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    //setRetainInstance(true);
  }
  
  //Do stuff now we're loaded
    public void onActivityCreated(Bundle savedInstanceState)
    {
      super.onActivityCreated(savedInstanceState);
    
      ((TextView) getView().findViewById(R.id.EventTitle)).setText(getArguments().getString("Device"));
      ((TextView) getView().findViewById(R.id.Componant)).setText(getArguments().getString("Component"));
      ((TextView) getView().findViewById(R.id.EventClass)).setText(getArguments().getString("EventClass"));
    ((TextView) getView().findViewById(R.id.Summary)).setText(Html.fromHtml(getArguments().getString("Summary")));
    ((TextView) getView().findViewById(R.id.FirstTime)).setText(getArguments().getString("FirstSeen"));
    ((TextView) getView().findViewById(R.id.LastTime)).setText(getArguments().getString("LastSeen"));
    ((TextView) getView().findViewById(R.id.EventCount)).setText(Integer.toString(getArguments().getInt("EventCount")));

    ((Button) getView().findViewById(R.id.AcknowledgeEvent)).setOnClickListener(new OnClickListener() 
      {
      public void onClick(View v) 
      {
        ((RhybuddHome) getActivity()).AcknowledgeSingleEvent(postionInList);
      }
    });
      /*getArguments().getString("Device");
      getArguments().getString("Component");
      getArguments().getString("EventClass");
      getArguments().getString("Summary");
      getArguments().getString("FirstSeen");
      getArguments().getString("LastSeen");
      getArguments().getString("EventCount");*/
    }
}




Java Source Code List

net.networksaremadeofstring.rhybudd.AddDeviceActivity.java
net.networksaremadeofstring.rhybudd.AddDeviceFragment.java
net.networksaremadeofstring.rhybudd.AuthenticatorService.java
net.networksaremadeofstring.rhybudd.Authenticator.java
net.networksaremadeofstring.rhybudd.CoreSettingsFragment.java
net.networksaremadeofstring.rhybudd.DeviceListWelcomeFragment.java
net.networksaremadeofstring.rhybudd.DeviceList.java
net.networksaremadeofstring.rhybudd.DiagnosticActivity.java
net.networksaremadeofstring.rhybudd.EventsListWelcomeFragment.java
net.networksaremadeofstring.rhybudd.FirstRunSettings.java
net.networksaremadeofstring.rhybudd.GCMIntentService.java
net.networksaremadeofstring.rhybudd.ManageDatabase.java
net.networksaremadeofstring.rhybudd.ManageUpdate.java
net.networksaremadeofstring.rhybudd.MassAcknowledgeReceiver.java
net.networksaremadeofstring.rhybudd.Notifications.java
net.networksaremadeofstring.rhybudd.PushConfigActivity.java
net.networksaremadeofstring.rhybudd.PushSettingsFragment.java
net.networksaremadeofstring.rhybudd.RhybuddBackupAgent.java
net.networksaremadeofstring.rhybudd.RhybuddDataSource.java
net.networksaremadeofstring.rhybudd.RhybuddDock.java
net.networksaremadeofstring.rhybudd.RhybuddDream.java
net.networksaremadeofstring.rhybudd.RhybuddHandlers.java
net.networksaremadeofstring.rhybudd.RhybuddHome.java
net.networksaremadeofstring.rhybudd.RhybuddOpenHelper.java
net.networksaremadeofstring.rhybudd.Search.java
net.networksaremadeofstring.rhybudd.SettingsFragment.java
net.networksaremadeofstring.rhybudd.StubProvider.java
net.networksaremadeofstring.rhybudd.SwipeDismissListViewTouchListener.java
net.networksaremadeofstring.rhybudd.SwipeDismissTouchListener.java
net.networksaremadeofstring.rhybudd.SyncAdapter.java
net.networksaremadeofstring.rhybudd.SyncService.java
net.networksaremadeofstring.rhybudd.TrustAllManager.java
net.networksaremadeofstring.rhybudd.TrustAllSSLSocketFactory.java
net.networksaremadeofstring.rhybudd.URLDrawable.java
net.networksaremadeofstring.rhybudd.URLImageParser.java
net.networksaremadeofstring.rhybudd.ViewEventFragment.java
net.networksaremadeofstring.rhybudd.ViewZenossDeviceActivity.java
net.networksaremadeofstring.rhybudd.ViewZenossDeviceFragment.java
net.networksaremadeofstring.rhybudd.ViewZenossDeviceListActivity.java
net.networksaremadeofstring.rhybudd.ViewZenossDeviceListFragment.java
net.networksaremadeofstring.rhybudd.ViewZenossDevice.java
net.networksaremadeofstring.rhybudd.ViewZenossEventActivity.java
net.networksaremadeofstring.rhybudd.ViewZenossEventFragment.java
net.networksaremadeofstring.rhybudd.ViewZenossEvent.java
net.networksaremadeofstring.rhybudd.ViewZenossEventsListActivity.java
net.networksaremadeofstring.rhybudd.ViewZenossEventsListFragment.java
net.networksaremadeofstring.rhybudd.ViewZenossGroupsActivity.java
net.networksaremadeofstring.rhybudd.ViewZenossGroupsFragment.java
net.networksaremadeofstring.rhybudd.WriteNFCActivity.java
net.networksaremadeofstring.rhybudd.ZaasSettingsFragment.java
net.networksaremadeofstring.rhybudd.ZenPack.java
net.networksaremadeofstring.rhybudd.ZenossAPICore.java
net.networksaremadeofstring.rhybudd.ZenossAPIZaas.java
net.networksaremadeofstring.rhybudd.ZenossAPI.java
net.networksaremadeofstring.rhybudd.ZenossAPIv2.java
net.networksaremadeofstring.rhybudd.ZenossCredentials.java
net.networksaremadeofstring.rhybudd.ZenossDeviceAdaptor.java
net.networksaremadeofstring.rhybudd.ZenossDevice.java
net.networksaremadeofstring.rhybudd.ZenossEvent.java
net.networksaremadeofstring.rhybudd.ZenossEventsAdaptor.java
net.networksaremadeofstring.rhybudd.ZenossGCMBroadcastReceiver.java
net.networksaremadeofstring.rhybudd.ZenossGroupsGridAdapter.java
net.networksaremadeofstring.rhybudd.ZenossPoller.java
net.networksaremadeofstring.rhybudd.ZenossSearchAdaptor.java
net.networksaremadeofstring.rhybudd.ZenossWidgetGraph.java
net.networksaremadeofstring.rhybudd.ZenossWidget.java