Android Open Source - GeoAlarms Alarm






From Project

Back to project page GeoAlarms.

License

The source code is released under:

GNU General Public License

If you think the Android project GeoAlarms 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.geoalarms.model;
/*from w  ww .ja  va2s  . c om*/
import com.geoalarms.model.Coordinates;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Alarm {
  public int id = 0;
  public int radius;
  public Coordinates coordinates;
  public String name;
  public String description;

  public Alarm(int radius, 
               Coordinates coordinates, 
               String name, 
               String description) {
    this.radius = radius;
    this.coordinates = coordinates;
    this.name = name;
    this.description = description;
  }

  public Alarm(int id,
               int radius, 
               Coordinates coordinates, 
               String name, 
               String description) {
    this.radius = radius;
    this.coordinates = coordinates;
    this.name = name;
    this.description = description;
  }

    public void update(int radius, 
                     Coordinates coordinates, 
                     String name, 
                     String description) {
    this.radius = radius;
    this.coordinates = coordinates;
    this.name = name;
    this.description = description;
    }

  public LinearLayout alarmView(Context con){
    LinearLayout pack = new LinearLayout(con);
    pack.setOrientation(LinearLayout.VERTICAL);
    
    TextView radio = new TextView(con);
    radio.setText(radius+"");
    
    TextView name = new TextView(con);
    name.setText(this.name);
    
    TextView description = new TextView(con);
    description.setText(this.description);

    pack.addView(radio);
    pack.addView(name);
    pack.addView(description);
    
    return pack;
  }
}




Java Source Code List

com.geoalarms.GeoAlarms.java
com.geoalarms.activity.AlarmEditor.java
com.geoalarms.activity.AlarmList.java
com.geoalarms.activity.Help.java
com.geoalarms.activity.Home.java
com.geoalarms.activity.Map.java
com.geoalarms.activity.Preferences.java
com.geoalarms.database.AlarmDatabaseHelper.java
com.geoalarms.database.AlarmManager.java
com.geoalarms.location.LocListener.java
com.geoalarms.location.ProximityIntentReceiver.java
com.geoalarms.map.AlarmOverlay.java
com.geoalarms.map.PointOverlay.java
com.geoalarms.model.Alarm.java
com.geoalarms.model.Coordinates.java