// Path: app/src/main/java/com/mikifus/padland/Models/Pad.java
// public class Pad
// {
//     private long id;
//     private String name;
//     private String local_name;
//     private String server;
//     private String url;
//     private long last_used_date;
//     private long create_date;
//     private long access_count;
// 
//     public Pad(Cursor c) {
//         if(c != null && c.getCount() > 0) {
//             id = c.getLong(0);
//             name = c.getString(1);
//             local_name = c.getString(2);
//             server =  c.getString(3);
//             url = c.getString(4);
//             last_used_date = c.getLong(5);
//             create_date = c.getLong(6);
//             access_count = c.getLong(7);
//         }
//     }
//     public long getId() {
//         return id;
//     }
//     public String getName() {
//         return name;
//     }
//     public String getLocalName() {
//         if(local_name == null || local_name.isEmpty()) {
//             return name;
//         }
//         return local_name;
//     }
//     public String getRawLocalName() {
//         if(local_name == null || local_name.isEmpty()) {
//             return "";
//         }
//         return local_name;
//     }
//     public String getServer() {
//         return server;
//     }
//     public String getUrl() {
//         return url;
//     }
//     public String getLastUsedDate(Context context) {
//         return lon_to_date( last_used_date, context );
//     }
//     public long getAccessCount() {
//         return access_count;
//     }
//     public String getCreateDate(Context context) {
//         return lon_to_date( create_date, context );
//     }
//     public String lon_to_date( long TimeinMilliSeccond, Context context ){
//         DateFormat formatter = android.text.format.DateFormat.getDateFormat( context.getApplicationContext() );
//         Date dateObj = new Date( TimeinMilliSeccond * 1000 );
//         return formatter.format( dateObj );
//     }
// }


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import com.mikifus.padland.Models.Pad;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
package com.mikifus.padland;




/**
 * This activity shows pad info like the last time it was used or when
 * it was created. It can be upgraded to show useful info.
 * Its menu as well allows to delete.
 */
public class PadInfoActivity extends PadLandDataActivity {

    private static final String TAG = "PadInfoActivity";

    long pad_id = 0;

    /**
     *
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pad_info);

        pad_id = this._getPadId();

        if( pad_id <= 0 ){
            Toast.makeText(this, getString(R.string.unexpected_error), Toast.LENGTH_LONG).show();
            return;
        }

// Path: app/src/main/java/com/mikifus/padland/Models/Pad.java
// public class Pad
// {
//     private long id;
//     private String name;
//     private String local_name;
//     private String server;
//     private String url;
//     private long last_used_date;
//     private long create_date;
//     private long access_count;
// 
//     public Pad(Cursor c) {
//         if(c != null && c.getCount() > 0) {
//             id = c.getLong(0);
//             name = c.getString(1);
//             local_name = c.getString(2);
//             server =  c.getString(3);
//             url = c.getString(4);
//             last_used_date = c.getLong(5);
//             create_date = c.getLong(6);
//             access_count = c.getLong(7);
//         }
//     }
//     public long getId() {
//         return id;
//     }
//     public String getName() {
//         return name;
//     }
//     public String getLocalName() {
//         if(local_name == null || local_name.isEmpty()) {
//             return name;
//         }
//         return local_name;
//     }
//     public String getRawLocalName() {
//         if(local_name == null || local_name.isEmpty()) {
//             return "";
//         }
//         return local_name;
//     }
//     public String getServer() {
//         return server;
//     }
//     public String getUrl() {
//         return url;
//     }
//     public String getLastUsedDate(Context context) {
//         return lon_to_date( last_used_date, context );
//     }
//     public long getAccessCount() {
//         return access_count;
//     }
//     public String getCreateDate(Context context) {
//         return lon_to_date( create_date, context );
//     }
//     public String lon_to_date( long TimeinMilliSeccond, Context context ){
//         DateFormat formatter = android.text.format.DateFormat.getDateFormat( context.getApplicationContext() );
//         Date dateObj = new Date( TimeinMilliSeccond * 1000 );
//         return formatter.format( dateObj );
//     }
// }


// Path: app/src/main/java/com/mikifus/padland/PadInfoActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import com.mikifus.padland.Models.Pad;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

package com.mikifus.padland;




/**
 * This activity shows pad info like the last time it was used or when
 * it was created. It can be upgraded to show useful info.
 * Its menu as well allows to delete.
 */
public class PadInfoActivity extends PadLandDataActivity {

    private static final String TAG = "PadInfoActivity";

    long pad_id = 0;

    /**
     *
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pad_info);

        pad_id = this._getPadId();

        if( pad_id <= 0 ){
            Toast.makeText(this, getString(R.string.unexpected_error), Toast.LENGTH_LONG).show();
            return;
        }

        Pad pad_data = this._getPad( pad_id );