If you think the Android project wally 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) 2014 Freddie (Musenkishi) Lust-Hed
*//fromwww.java2s.com
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.musenkishi.wally.models;
import android.net.Uri;
import android.os.Parcelable;
import java.util.ArrayList;
import auto.parcel.AutoParcel;
/**
* Contains all available data on an Image.
* Created by Musenkishi on 2014-04-05 21:11.
*/
@AutoParcel
publicabstractclass ImagePage implements Parcelable {
publicabstract String title();
publicabstract String imageId();
publicabstract Uri imagePath();
publicabstract String resolution();
publicabstract String category();
publicabstract String rating();
publicabstract String uploader();
publicabstract String uploadDate();
publicabstract Author author();
/*public abstract ArrayList<Tag> tags();*/publicstatic ImagePage create(String title, String imageId, Uri imagePath, String resolution, String category, String rating, String uploader, String uploadDate, Author author/*, ArrayList<Tag> tags*/) {
returnnew AutoParcel_ImagePage(title, imageId, imagePath, resolution, category, rating, uploader, uploadDate, author/*, tags*/);
}
publicint getImageHeight() {
String height = resolution().split("x")[1].trim();
return Integer.parseInt(height);
}
publicint getImageWidth() {
String width = resolution().split("x")[0].trim();
return Integer.parseInt(width);
}
}