Browse Source

Now it looks like an app.. LOL

Infinite 3 years ago
parent
commit
d705d0565f

+ 3 - 0
app/build.gradle

@@ -39,4 +39,7 @@ dependencies {
     implementation 'com.google.android.material:material:1.3.0'
     implementation 'com.squareup.retrofit2:retrofit:2.9.0'
     implementation 'com.google.code.gson:gson:2.8.7'
+    implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
+    implementation 'com.squareup.okhttp3:logging-interceptor:3.3.0'
+    implementation 'com.squareup.picasso:picasso:2.8'
 }

+ 3 - 2
app/src/main/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="club.thepenguins.android">
 
-    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.INTERNET" />
 
     <application
         android:allowBackup="true"
@@ -11,7 +11,8 @@
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:theme="@style/Theme.PenguinsRead">
-        <activity android:name=".MainActivity">
+        <activity android:name=".activities.PostDetailsActivity" />
+        <activity android:name=".activities.MainActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 0 - 14
app/src/main/java/club/thepenguins/android/MainActivity.java

@@ -1,14 +0,0 @@
-package club.thepenguins.android;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import android.os.Bundle;
-
-public class MainActivity extends AppCompatActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-    }
-}

+ 100 - 0
app/src/main/java/club/thepenguins/android/activities/MainActivity.java

@@ -0,0 +1,100 @@
+package club.thepenguins.android.activities;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.ProgressBar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import club.thepenguins.android.R;
+import club.thepenguins.android.adapters.PostRecyclerAdapter;
+import club.thepenguins.android.api.APIService;
+import club.thepenguins.android.data.Model;
+import club.thepenguins.android.data.Posts;
+import club.thepenguins.android.utils.Constants;
+import retrofit2.Call;
+import retrofit2.Callback;
+import retrofit2.Response;
+import retrofit2.Retrofit;
+import retrofit2.converter.gson.GsonConverterFactory;
+
+public class MainActivity extends AppCompatActivity {
+
+    private static final String TAG = "MainAc";
+    private RecyclerView recyclerView;
+    private ProgressBar progressBar;
+    private LinearLayoutManager LayoutManager;
+    private ArrayList<Model> list;
+    private PostRecyclerAdapter adapter;
+    public static List<Posts> mListPost;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        recyclerView = findViewById(R.id.recycler_view);
+        progressBar = findViewById(R.id.progressbar);
+
+        LayoutManager = new LinearLayoutManager(MainActivity.this, LinearLayoutManager.VERTICAL, false);
+        recyclerView.setLayoutManager(LayoutManager);
+
+        list = new ArrayList<>();
+
+        getRetrofit();
+
+        adapter = new PostRecyclerAdapter(list, MainActivity.this);
+
+        recyclerView.setAdapter(adapter);
+    }
+
+    private void getRetrofit() {
+
+        Retrofit retrofit = new Retrofit.Builder()
+                .baseUrl(Constants.BaseUrl)
+                .addConverterFactory(GsonConverterFactory.create())
+                .build();
+
+        APIService service = retrofit.create(APIService.class);
+        Call<List<Posts>> call = service.getPosts();
+
+
+        call.enqueue(new Callback<List<Posts>>() {
+            @Override
+            public void onResponse(Call<List<Posts>> call, Response<List<Posts>> response) {
+
+                //Log.d(TAG, "onResponse: " + response.body().get();
+
+
+                mListPost = response.body();
+                progressBar.setVisibility(View.GONE);
+                for (int i = 0; i < response.body().size(); i++) {
+
+                    // getFeaturedImage();
+
+                    // getFeaturedImage(response.body().get(i).getLinks().getWpFeaturedmedia().get(0).getHref());
+
+                    list.add(new Model(response.body().get(i).getTitle().getRendered(), response.body().get(i).getContent().getRendered(), response.body().get(i).getEmbedded().getWpFeaturedmedia().get(0).getSourceUrl(), response.body().get(i).getContent().getRendered()));
+
+                    Log.d(TAG, "onResponse: " + response.body().get(i).getEmbedded().getWpFeaturedmedia().get(0).getSourceUrl());
+                }
+                adapter.notifyDataSetChanged();
+
+            }
+
+            @Override
+            public void onFailure(Call<List<Posts>> call, Throwable t) {
+
+                Log.d(TAG, "onFailure: ", t);
+            }
+        });
+    }
+
+
+}

+ 48 - 0
app/src/main/java/club/thepenguins/android/activities/PostDetailsActivity.java

@@ -0,0 +1,48 @@
+package club.thepenguins.android.activities;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.webkit.WebView;
+
+import club.thepenguins.android.R;
+
+public class PostDetailsActivity extends AppCompatActivity {
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_post_details);
+        // TextView textView = findViewById(R.id.postd);
+
+
+        Intent i = getIntent();
+        String post = i.getExtras().getString("content");
+
+        Log.d("PostDetails ", "onCreate: " + post);
+
+        /*
+
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+            textView.setText(Html.fromHtml(post, Html.FROM_HTML_MODE_COMPACT));
+        } else {
+            textView.setText(Html.fromHtml(post));
+        }
+
+
+         */
+
+        WebView myWebView = (WebView) findViewById(R.id.webview);
+
+        myWebView.loadDataWithBaseURL(null, post, "text/html", "UTF-8", null);
+        myWebView.getSettings().setUserAgentString("Android");
+        myWebView.getSettings().setBuiltInZoomControls(true);
+        // myWebView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING);
+        //myWebView.getSettings().getLoadWithOverviewMode();
+        //myWebView.getSettings().setUseWideViewPort(true);
+
+    }
+}

+ 127 - 0
app/src/main/java/club/thepenguins/android/adapters/PostRecyclerAdapter.java

@@ -0,0 +1,127 @@
+package club.thepenguins.android.adapters;
+
+import android.content.Context;
+import android.content.Intent;
+import android.text.Html;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.cardview.widget.CardView;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.squareup.picasso.Callback;
+import com.squareup.picasso.NetworkPolicy;
+import com.squareup.picasso.Picasso;
+
+import java.util.ArrayList;
+
+import club.thepenguins.android.R;
+import club.thepenguins.android.activities.PostDetailsActivity;
+import club.thepenguins.android.data.Model;
+
+public class PostRecyclerAdapter extends RecyclerView.Adapter<PostRecyclerAdapter.ViewHolder> {
+
+
+    private ArrayList<Model> data;
+    private Context ctx;
+
+    public PostRecyclerAdapter(ArrayList<Model> list, Context context) {
+        this.data = list;
+        this.ctx = context;
+    }
+
+    @NonNull
+    @Override
+    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+
+        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.post_item, parent, false);
+
+        return new ViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
+
+        final Model object = data.get(position);
+
+        holder.title.setText(object.title);
+        holder.subtitle.setText(Html.fromHtml(object.subtitle));
+
+        Picasso.get()
+                .load(object.Image)
+                .placeholder(R.color.preloadColor)
+                .fit()
+                .centerCrop()
+                .networkPolicy(NetworkPolicy.OFFLINE)
+                .into(holder.imageView, new Callback() {
+                    @Override
+                    public void onSuccess() {
+
+                    }
+
+                    @Override
+                    public void onError(Exception e) {
+                        Picasso.get()
+                                .load(object.Image)
+                                .placeholder(R.color.preloadColor)
+                                .fit()
+                                .centerCrop()
+                                .into(holder.imageView);
+                    }
+                });
+
+        /*
+        final Handler handler = new Handler();
+        handler.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+
+            }
+        }, 1000);
+         */
+
+
+        holder.cardView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent intent = new Intent(ctx, PostDetailsActivity.class);
+                intent.putExtra("content", object.Content);
+                ctx.startActivity(intent);
+            }
+        });
+
+
+    }
+
+    @Override
+    public int getItemCount() {
+        return data.size();
+    }
+
+    public class ViewHolder extends RecyclerView.ViewHolder {
+
+
+        TextView title, subtitle;
+        ImageView imageView;
+        CardView cardView;
+
+        public ViewHolder(@NonNull View itemView) {
+            super(itemView);
+
+            cardView = itemView.findViewById(R.id.card);
+
+            title = itemView.findViewById(R.id.title);
+            subtitle = itemView.findViewById(R.id.subtitle);
+            imageView = itemView.findViewById(R.id.Icon);
+        }
+    }
+
+    public void setData(ArrayList<Model> data) {
+        this.data = data;
+        notifyDataSetChanged();
+    }
+}

+ 14 - 0
app/src/main/java/club/thepenguins/android/api/APIService.java

@@ -1,4 +1,18 @@
 package club.thepenguins.android.api;
 
+import java.util.List;
+
+import club.thepenguins.android.data.Image;
+import club.thepenguins.android.data.Posts;
+import retrofit2.Call;
+import retrofit2.http.GET;
+
 public interface APIService {
+
+    @GET("wp-json/wp/v2/posts?_embed")
+    Call<List<Posts>> getPosts();
+
+    @GET(".")
+    Call<Image> getFeaturedImageLink();
+
 }

+ 7 - 0
app/src/main/java/club/thepenguins/android/api/Listener.java

@@ -0,0 +1,7 @@
+package club.thepenguins.android.api;
+
+public interface Listener {
+
+     void onData(String sourceURL);
+     void onFailed();
+}

+ 934 - 0
app/src/main/java/club/thepenguins/android/data/Image.java

@@ -0,0 +1,934 @@
+package club.thepenguins.android.data;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+
+/*
+    Created from: https://www.jsonschema2pojo.org/
+ */
+
+
+
+public class Image {
+
+    @SerializedName("id")
+    @Expose
+    private Integer id;
+    @SerializedName("date")
+    @Expose
+    private String date;
+    @SerializedName("date_gmt")
+    @Expose
+    private String dateGmt;
+    @SerializedName("guid")
+    @Expose
+    private Guid guid;
+    @SerializedName("modified")
+    @Expose
+    private String modified;
+    @SerializedName("modified_gmt")
+    @Expose
+    private String modifiedGmt;
+    @SerializedName("slug")
+    @Expose
+    private String slug;
+    @SerializedName("status")
+    @Expose
+    private String status;
+    @SerializedName("type")
+    @Expose
+    private String type;
+    @SerializedName("link")
+    @Expose
+    private String link;
+    @SerializedName("title")
+    @Expose
+    private Title title;
+    @SerializedName("author")
+    @Expose
+    private Integer author;
+    @SerializedName("comment_status")
+    @Expose
+    private String commentStatus;
+    @SerializedName("ping_status")
+    @Expose
+    private String pingStatus;
+    @SerializedName("template")
+    @Expose
+    private String template;
+    @SerializedName("meta")
+    @Expose
+    private List<Object> meta = null;
+    @SerializedName("description")
+    @Expose
+    private Description description;
+    @SerializedName("caption")
+    @Expose
+    private Caption caption;
+    @SerializedName("alt_text")
+    @Expose
+    private String altText;
+    @SerializedName("media_type")
+    @Expose
+    private String mediaType;
+    @SerializedName("mime_type")
+    @Expose
+    private String mimeType;
+    @SerializedName("media_details")
+    @Expose
+    private MediaDetails mediaDetails;
+    @SerializedName("post")
+    @Expose
+    private Integer post;
+    @SerializedName("source_url")
+    @Expose
+    private String sourceUrl;
+    @SerializedName("_links")
+    @Expose
+    private Links links;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public String getDateGmt() {
+        return dateGmt;
+    }
+
+    public void setDateGmt(String dateGmt) {
+        this.dateGmt = dateGmt;
+    }
+
+    public Guid getGuid() {
+        return guid;
+    }
+
+    public void setGuid(Guid guid) {
+        this.guid = guid;
+    }
+
+    public String getModified() {
+        return modified;
+    }
+
+    public void setModified(String modified) {
+        this.modified = modified;
+    }
+
+    public String getModifiedGmt() {
+        return modifiedGmt;
+    }
+
+    public void setModifiedGmt(String modifiedGmt) {
+        this.modifiedGmt = modifiedGmt;
+    }
+
+    public String getSlug() {
+        return slug;
+    }
+
+    public void setSlug(String slug) {
+        this.slug = slug;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getLink() {
+        return link;
+    }
+
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    public Title getTitle() {
+        return title;
+    }
+
+    public void setTitle(Title title) {
+        this.title = title;
+    }
+
+    public Integer getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(Integer author) {
+        this.author = author;
+    }
+
+    public String getCommentStatus() {
+        return commentStatus;
+    }
+
+    public void setCommentStatus(String commentStatus) {
+        this.commentStatus = commentStatus;
+    }
+
+    public String getPingStatus() {
+        return pingStatus;
+    }
+
+    public void setPingStatus(String pingStatus) {
+        this.pingStatus = pingStatus;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(String template) {
+        this.template = template;
+    }
+
+    public List<Object> getMeta() {
+        return meta;
+    }
+
+    public void setMeta(List<Object> meta) {
+        this.meta = meta;
+    }
+
+    public Description getDescription() {
+        return description;
+    }
+
+    public void setDescription(Description description) {
+        this.description = description;
+    }
+
+    public Caption getCaption() {
+        return caption;
+    }
+
+    public void setCaption(Caption caption) {
+        this.caption = caption;
+    }
+
+    public String getAltText() {
+        return altText;
+    }
+
+    public void setAltText(String altText) {
+        this.altText = altText;
+    }
+
+    public String getMediaType() {
+        return mediaType;
+    }
+
+    public void setMediaType(String mediaType) {
+        this.mediaType = mediaType;
+    }
+
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    public MediaDetails getMediaDetails() {
+        return mediaDetails;
+    }
+
+    public void setMediaDetails(MediaDetails mediaDetails) {
+        this.mediaDetails = mediaDetails;
+    }
+
+    public Integer getPost() {
+        return post;
+    }
+
+    public void setPost(Integer post) {
+        this.post = post;
+    }
+
+    public String getSourceUrl() {
+        return sourceUrl;
+    }
+
+    public void setSourceUrl(String sourceUrl) {
+        this.sourceUrl = sourceUrl;
+    }
+
+    public Links getLinks() {
+        return links;
+    }
+
+    public void setLinks(Links links) {
+        this.links = links;
+    }
+
+
+    public class About {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Author {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Caption {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class Collection {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Description {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class Full {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Guid {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class ImageMeta {
+
+        @SerializedName("aperture")
+        @Expose
+        private String aperture;
+        @SerializedName("credit")
+        @Expose
+        private String credit;
+        @SerializedName("camera")
+        @Expose
+        private String camera;
+        @SerializedName("caption")
+        @Expose
+        private String caption;
+        @SerializedName("created_timestamp")
+        @Expose
+        private String createdTimestamp;
+        @SerializedName("copyright")
+        @Expose
+        private String copyright;
+        @SerializedName("focal_length")
+        @Expose
+        private String focalLength;
+        @SerializedName("iso")
+        @Expose
+        private String iso;
+        @SerializedName("shutter_speed")
+        @Expose
+        private String shutterSpeed;
+        @SerializedName("title")
+        @Expose
+        private String title;
+        @SerializedName("orientation")
+        @Expose
+        private String orientation;
+        @SerializedName("keywords")
+        @Expose
+        private List<Object> keywords = null;
+
+        public String getAperture() {
+            return aperture;
+        }
+
+        public void setAperture(String aperture) {
+            this.aperture = aperture;
+        }
+
+        public String getCredit() {
+            return credit;
+        }
+
+        public void setCredit(String credit) {
+            this.credit = credit;
+        }
+
+        public String getCamera() {
+            return camera;
+        }
+
+        public void setCamera(String camera) {
+            this.camera = camera;
+        }
+
+        public String getCaption() {
+            return caption;
+        }
+
+        public void setCaption(String caption) {
+            this.caption = caption;
+        }
+
+        public String getCreatedTimestamp() {
+            return createdTimestamp;
+        }
+
+        public void setCreatedTimestamp(String createdTimestamp) {
+            this.createdTimestamp = createdTimestamp;
+        }
+
+        public String getCopyright() {
+            return copyright;
+        }
+
+        public void setCopyright(String copyright) {
+            this.copyright = copyright;
+        }
+
+        public String getFocalLength() {
+            return focalLength;
+        }
+
+        public void setFocalLength(String focalLength) {
+            this.focalLength = focalLength;
+        }
+
+        public String getIso() {
+            return iso;
+        }
+
+        public void setIso(String iso) {
+            this.iso = iso;
+        }
+
+        public String getShutterSpeed() {
+            return shutterSpeed;
+        }
+
+        public void setShutterSpeed(String shutterSpeed) {
+            this.shutterSpeed = shutterSpeed;
+        }
+
+        public String getTitle() {
+            return title;
+        }
+
+        public void setTitle(String title) {
+            this.title = title;
+        }
+
+        public String getOrientation() {
+            return orientation;
+        }
+
+        public void setOrientation(String orientation) {
+            this.orientation = orientation;
+        }
+
+        public List<Object> getKeywords() {
+            return keywords;
+        }
+
+        public void setKeywords(List<Object> keywords) {
+            this.keywords = keywords;
+        }
+
+    }
+
+    public class Links {
+
+        @SerializedName("self")
+        @Expose
+        private List<Self> self = null;
+        @SerializedName("collection")
+        @Expose
+        private List<Collection> collection = null;
+        @SerializedName("about")
+        @Expose
+        private List<About> about = null;
+        @SerializedName("author")
+        @Expose
+        private List<Author> author = null;
+        @SerializedName("replies")
+        @Expose
+        private List<Reply> replies = null;
+
+        public List<Self> getSelf() {
+            return self;
+        }
+
+        public void setSelf(List<Self> self) {
+            this.self = self;
+        }
+
+        public List<Collection> getCollection() {
+            return collection;
+        }
+
+        public void setCollection(List<Collection> collection) {
+            this.collection = collection;
+        }
+
+        public List<About> getAbout() {
+            return about;
+        }
+
+        public void setAbout(List<About> about) {
+            this.about = about;
+        }
+
+        public List<Author> getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(List<Author> author) {
+            this.author = author;
+        }
+
+        public List<Reply> getReplies() {
+            return replies;
+        }
+
+        public void setReplies(List<Reply> replies) {
+            this.replies = replies;
+        }
+
+    }
+
+    public class MediaDetails {
+
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("sizes")
+        @Expose
+        private Sizes sizes;
+        @SerializedName("image_meta")
+        @Expose
+        private ImageMeta imageMeta;
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Sizes getSizes() {
+            return sizes;
+        }
+
+        public void setSizes(Sizes sizes) {
+            this.sizes = sizes;
+        }
+
+        public ImageMeta getImageMeta() {
+            return imageMeta;
+        }
+
+        public void setImageMeta(ImageMeta imageMeta) {
+            this.imageMeta = imageMeta;
+        }
+
+    }
+
+    public class Medium {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Reply {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Self {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Sizes {
+
+        @SerializedName("medium")
+        @Expose
+        private Medium medium;
+        @SerializedName("thumbnail")
+        @Expose
+        private Thumbnail thumbnail;
+        @SerializedName("full")
+        @Expose
+        private Full full;
+
+        public Medium getMedium() {
+            return medium;
+        }
+
+        public void setMedium(Medium medium) {
+            this.medium = medium;
+        }
+
+        public Thumbnail getThumbnail() {
+            return thumbnail;
+        }
+
+        public void setThumbnail(Thumbnail thumbnail) {
+            this.thumbnail = thumbnail;
+        }
+
+        public Full getFull() {
+            return full;
+        }
+
+        public void setFull(Full full) {
+            this.full = full;
+        }
+
+    }
+
+    public class Thumbnail {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Title {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+}

+ 19 - 0
app/src/main/java/club/thepenguins/android/data/Model.java

@@ -0,0 +1,19 @@
+package club.thepenguins.android.data;
+
+public class Model {
+    public String title, subtitle, Image, Content;
+
+    public Model ( String mtitle, String msubtitle, String image){
+
+        this.title = mtitle;
+        this.subtitle = msubtitle;
+        this.Image = image;
+    }
+
+    public Model(String title, String subtitle, String image, String content) {
+        this.title = title;
+        this.subtitle = subtitle;
+        this.Image = image;
+        this.Content = content;
+    }
+}

+ 2008 - 0
app/src/main/java/club/thepenguins/android/data/Posts.java

@@ -0,0 +1,2008 @@
+package club.thepenguins.android.data;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+/*
+    Created from: https://www.jsonschema2pojo.org/
+ */
+
+
+public class Posts {
+
+    @SerializedName("id")
+    @Expose
+    private Integer id;
+    @SerializedName("date")
+    @Expose
+    private String date;
+    @SerializedName("date_gmt")
+    @Expose
+    private String dateGmt;
+    @SerializedName("guid")
+    @Expose
+    private Guid guid;
+    @SerializedName("modified")
+    @Expose
+    private String modified;
+    @SerializedName("modified_gmt")
+    @Expose
+    private String modifiedGmt;
+    @SerializedName("slug")
+    @Expose
+    private String slug;
+    @SerializedName("status")
+    @Expose
+    private String status;
+    @SerializedName("type")
+    @Expose
+    private String type;
+    @SerializedName("link")
+    @Expose
+    private String link;
+    @SerializedName("title")
+    @Expose
+    private Title title;
+    @SerializedName("content")
+    @Expose
+    private Content content;
+    @SerializedName("excerpt")
+    @Expose
+    private Excerpt excerpt;
+    @SerializedName("author")
+    @Expose
+    private Integer author;
+    @SerializedName("featured_media")
+    @Expose
+    private Integer featuredMedia;
+    @SerializedName("comment_status")
+    @Expose
+    private String commentStatus;
+    @SerializedName("ping_status")
+    @Expose
+    private String pingStatus;
+    @SerializedName("sticky")
+    @Expose
+    private Boolean sticky;
+    @SerializedName("template")
+    @Expose
+    private String template;
+    @SerializedName("format")
+    @Expose
+    private String format;
+    @SerializedName("meta")
+    @Expose
+    private List<Object> meta = null;
+    @SerializedName("categories")
+    @Expose
+    private List<Integer> categories = null;
+    @SerializedName("tags")
+    @Expose
+    private List<Object> tags = null;
+    @SerializedName("_links")
+    @Expose
+    private Links links;
+    @SerializedName("_embedded")
+    @Expose
+    private Embedded embedded;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public String getDateGmt() {
+        return dateGmt;
+    }
+
+    public void setDateGmt(String dateGmt) {
+        this.dateGmt = dateGmt;
+    }
+
+    public Guid getGuid() {
+        return guid;
+    }
+
+    public void setGuid(Guid guid) {
+        this.guid = guid;
+    }
+
+    public String getModified() {
+        return modified;
+    }
+
+    public void setModified(String modified) {
+        this.modified = modified;
+    }
+
+    public String getModifiedGmt() {
+        return modifiedGmt;
+    }
+
+    public void setModifiedGmt(String modifiedGmt) {
+        this.modifiedGmt = modifiedGmt;
+    }
+
+    public String getSlug() {
+        return slug;
+    }
+
+    public void setSlug(String slug) {
+        this.slug = slug;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getLink() {
+        return link;
+    }
+
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    public Title getTitle() {
+        return title;
+    }
+
+    public void setTitle(Title title) {
+        this.title = title;
+    }
+
+    public Content getContent() {
+        return content;
+    }
+
+    public void setContent(Content content) {
+        this.content = content;
+    }
+
+    public Excerpt getExcerpt() {
+        return excerpt;
+    }
+
+    public void setExcerpt(Excerpt excerpt) {
+        this.excerpt = excerpt;
+    }
+
+    public Integer getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(Integer author) {
+        this.author = author;
+    }
+
+    public Integer getFeaturedMedia() {
+        return featuredMedia;
+    }
+
+    public void setFeaturedMedia(Integer featuredMedia) {
+        this.featuredMedia = featuredMedia;
+    }
+
+    public String getCommentStatus() {
+        return commentStatus;
+    }
+
+    public void setCommentStatus(String commentStatus) {
+        this.commentStatus = commentStatus;
+    }
+
+    public String getPingStatus() {
+        return pingStatus;
+    }
+
+    public void setPingStatus(String pingStatus) {
+        this.pingStatus = pingStatus;
+    }
+
+    public Boolean getSticky() {
+        return sticky;
+    }
+
+    public void setSticky(Boolean sticky) {
+        this.sticky = sticky;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(String template) {
+        this.template = template;
+    }
+
+    public String getFormat() {
+        return format;
+    }
+
+    public void setFormat(String format) {
+        this.format = format;
+    }
+
+    public List<Object> getMeta() {
+        return meta;
+    }
+
+    public void setMeta(List<Object> meta) {
+        this.meta = meta;
+    }
+
+    public List<Integer> getCategories() {
+        return categories;
+    }
+
+    public void setCategories(List<Integer> categories) {
+        this.categories = categories;
+    }
+
+    public List<Object> getTags() {
+        return tags;
+    }
+
+    public void setTags(List<Object> tags) {
+        this.tags = tags;
+    }
+
+    public Links getLinks() {
+        return links;
+    }
+
+    public void setLinks(Links links) {
+        this.links = links;
+    }
+
+    public Embedded getEmbedded() {
+        return embedded;
+    }
+
+    public void setEmbedded(Embedded embedded) {
+        this.embedded = embedded;
+    }
+
+
+    public class About {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class About__1 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class About__2 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Author {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Author__1 {
+
+        @SerializedName("id")
+        @Expose
+        private Integer id;
+        @SerializedName("name")
+        @Expose
+        private String name;
+        @SerializedName("url")
+        @Expose
+        private String url;
+        @SerializedName("description")
+        @Expose
+        private String description;
+        @SerializedName("link")
+        @Expose
+        private String link;
+        @SerializedName("slug")
+        @Expose
+        private String slug;
+        @SerializedName("avatar_urls")
+        @Expose
+        private AvatarUrls avatarUrls;
+        @SerializedName("_links")
+        @Expose
+        private Links__1 links;
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        public String getDescription() {
+            return description;
+        }
+
+        public void setDescription(String description) {
+            this.description = description;
+        }
+
+        public String getLink() {
+            return link;
+        }
+
+        public void setLink(String link) {
+            this.link = link;
+        }
+
+        public String getSlug() {
+            return slug;
+        }
+
+        public void setSlug(String slug) {
+            this.slug = slug;
+        }
+
+        public AvatarUrls getAvatarUrls() {
+            return avatarUrls;
+        }
+
+        public void setAvatarUrls(AvatarUrls avatarUrls) {
+            this.avatarUrls = avatarUrls;
+        }
+
+        public Links__1 getLinks() {
+            return links;
+        }
+
+        public void setLinks(Links__1 links) {
+            this.links = links;
+        }
+
+    }
+
+    public class Author__2 {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class AvatarUrls {
+
+        @SerializedName("24")
+        @Expose
+        private String _24;
+        @SerializedName("48")
+        @Expose
+        private String _48;
+        @SerializedName("96")
+        @Expose
+        private String _96;
+
+        public String get24() {
+            return _24;
+        }
+
+        public void set24(String _24) {
+            this._24 = _24;
+        }
+
+        public String get48() {
+            return _48;
+        }
+
+        public void set48(String _48) {
+            this._48 = _48;
+        }
+
+        public String get96() {
+            return _96;
+        }
+
+        public void set96(String _96) {
+            this._96 = _96;
+        }
+
+    }
+
+    public class Caption {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class Collection {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Collection__1 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Collection__2 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Collection__3 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Content {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+        @SerializedName("protected")
+        @Expose
+        private Boolean _protected;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+        public Boolean getProtected() {
+            return _protected;
+        }
+
+        public void setProtected(Boolean _protected) {
+            this._protected = _protected;
+        }
+
+    }
+
+    public class Cury {
+
+        @SerializedName("name")
+        @Expose
+        private String name;
+        @SerializedName("href")
+        @Expose
+        private String href;
+        @SerializedName("templated")
+        @Expose
+        private Boolean templated;
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+        public Boolean getTemplated() {
+            return templated;
+        }
+
+        public void setTemplated(Boolean templated) {
+            this.templated = templated;
+        }
+
+    }
+
+    public class Cury__1 {
+
+        @SerializedName("name")
+        @Expose
+        private String name;
+        @SerializedName("href")
+        @Expose
+        private String href;
+        @SerializedName("templated")
+        @Expose
+        private Boolean templated;
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+        public Boolean getTemplated() {
+            return templated;
+        }
+
+        public void setTemplated(Boolean templated) {
+            this.templated = templated;
+        }
+
+    }
+
+    public class Embedded {
+
+        @SerializedName("author")
+        @Expose
+        private List<Author__1> author = null;
+        @SerializedName("wp:featuredmedia")
+        @Expose
+        private List<WpFeaturedmedium__1> wpFeaturedmedia = null;
+        @SerializedName("wp:term")
+        @Expose
+        private List<List<WpTerm__1>> wpTerm = null;
+
+        public List<Author__1> getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(List<Author__1> author) {
+            this.author = author;
+        }
+
+        public List<WpFeaturedmedium__1> getWpFeaturedmedia() {
+            return wpFeaturedmedia;
+        }
+
+        public void setWpFeaturedmedia(List<WpFeaturedmedium__1> wpFeaturedmedia) {
+            this.wpFeaturedmedia = wpFeaturedmedia;
+        }
+
+        public List<List<WpTerm__1>> getWpTerm() {
+            return wpTerm;
+        }
+
+        public void setWpTerm(List<List<WpTerm__1>> wpTerm) {
+            this.wpTerm = wpTerm;
+        }
+
+    }
+
+
+    public class Excerpt {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+        @SerializedName("protected")
+        @Expose
+        private Boolean _protected;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+        public Boolean getProtected() {
+            return _protected;
+        }
+
+        public void setProtected(Boolean _protected) {
+            this._protected = _protected;
+        }
+
+    }
+
+    public class Full {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Guid {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class ImageMeta {
+
+        @SerializedName("aperture")
+        @Expose
+        private String aperture;
+        @SerializedName("credit")
+        @Expose
+        private String credit;
+        @SerializedName("camera")
+        @Expose
+        private String camera;
+        @SerializedName("caption")
+        @Expose
+        private String caption;
+        @SerializedName("created_timestamp")
+        @Expose
+        private String createdTimestamp;
+        @SerializedName("copyright")
+        @Expose
+        private String copyright;
+        @SerializedName("focal_length")
+        @Expose
+        private String focalLength;
+        @SerializedName("iso")
+        @Expose
+        private String iso;
+        @SerializedName("shutter_speed")
+        @Expose
+        private String shutterSpeed;
+        @SerializedName("title")
+        @Expose
+        private String title;
+        @SerializedName("orientation")
+        @Expose
+        private String orientation;
+        @SerializedName("keywords")
+        @Expose
+        private List<Object> keywords = null;
+
+        public String getAperture() {
+            return aperture;
+        }
+
+        public void setAperture(String aperture) {
+            this.aperture = aperture;
+        }
+
+        public String getCredit() {
+            return credit;
+        }
+
+        public void setCredit(String credit) {
+            this.credit = credit;
+        }
+
+        public String getCamera() {
+            return camera;
+        }
+
+        public void setCamera(String camera) {
+            this.camera = camera;
+        }
+
+        public String getCaption() {
+            return caption;
+        }
+
+        public void setCaption(String caption) {
+            this.caption = caption;
+        }
+
+        public String getCreatedTimestamp() {
+            return createdTimestamp;
+        }
+
+        public void setCreatedTimestamp(String createdTimestamp) {
+            this.createdTimestamp = createdTimestamp;
+        }
+
+        public String getCopyright() {
+            return copyright;
+        }
+
+        public void setCopyright(String copyright) {
+            this.copyright = copyright;
+        }
+
+        public String getFocalLength() {
+            return focalLength;
+        }
+
+        public void setFocalLength(String focalLength) {
+            this.focalLength = focalLength;
+        }
+
+        public String getIso() {
+            return iso;
+        }
+
+        public void setIso(String iso) {
+            this.iso = iso;
+        }
+
+        public String getShutterSpeed() {
+            return shutterSpeed;
+        }
+
+        public void setShutterSpeed(String shutterSpeed) {
+            this.shutterSpeed = shutterSpeed;
+        }
+
+        public String getTitle() {
+            return title;
+        }
+
+        public void setTitle(String title) {
+            this.title = title;
+        }
+
+        public String getOrientation() {
+            return orientation;
+        }
+
+        public void setOrientation(String orientation) {
+            this.orientation = orientation;
+        }
+
+        public List<Object> getKeywords() {
+            return keywords;
+        }
+
+        public void setKeywords(List<Object> keywords) {
+            this.keywords = keywords;
+        }
+
+    }
+
+    public class Links {
+
+        @SerializedName("self")
+        @Expose
+        private List<Self> self = null;
+        @SerializedName("collection")
+        @Expose
+        private List<Collection> collection = null;
+        @SerializedName("about")
+        @Expose
+        private List<About> about = null;
+        @SerializedName("author")
+        @Expose
+        private List<Author> author = null;
+        @SerializedName("replies")
+        @Expose
+        private List<Reply> replies = null;
+        @SerializedName("version-history")
+        @Expose
+        private List<VersionHistory> versionHistory = null;
+        @SerializedName("wp:featuredmedia")
+        @Expose
+        private List<WpFeaturedmedium> wpFeaturedmedia = null;
+        @SerializedName("wp:attachment")
+        @Expose
+        private List<WpAttachment> wpAttachment = null;
+        @SerializedName("wp:term")
+        @Expose
+        private List<WpTerm> wpTerm = null;
+        @SerializedName("curies")
+        @Expose
+        private List<Cury> curies = null;
+
+        public List<Self> getSelf() {
+            return self;
+        }
+
+        public void setSelf(List<Self> self) {
+            this.self = self;
+        }
+
+        public List<Collection> getCollection() {
+            return collection;
+        }
+
+        public void setCollection(List<Collection> collection) {
+            this.collection = collection;
+        }
+
+        public List<About> getAbout() {
+            return about;
+        }
+
+        public void setAbout(List<About> about) {
+            this.about = about;
+        }
+
+        public List<Author> getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(List<Author> author) {
+            this.author = author;
+        }
+
+        public List<Reply> getReplies() {
+            return replies;
+        }
+
+        public void setReplies(List<Reply> replies) {
+            this.replies = replies;
+        }
+
+        public List<VersionHistory> getVersionHistory() {
+            return versionHistory;
+        }
+
+        public void setVersionHistory(List<VersionHistory> versionHistory) {
+            this.versionHistory = versionHistory;
+        }
+
+        public List<WpFeaturedmedium> getWpFeaturedmedia() {
+            return wpFeaturedmedia;
+        }
+
+        public void setWpFeaturedmedia(List<WpFeaturedmedium> wpFeaturedmedia) {
+            this.wpFeaturedmedia = wpFeaturedmedia;
+        }
+
+        public List<WpAttachment> getWpAttachment() {
+            return wpAttachment;
+        }
+
+        public void setWpAttachment(List<WpAttachment> wpAttachment) {
+            this.wpAttachment = wpAttachment;
+        }
+
+        public List<WpTerm> getWpTerm() {
+            return wpTerm;
+        }
+
+        public void setWpTerm(List<WpTerm> wpTerm) {
+            this.wpTerm = wpTerm;
+        }
+
+        public List<Cury> getCuries() {
+            return curies;
+        }
+
+        public void setCuries(List<Cury> curies) {
+            this.curies = curies;
+        }
+
+    }
+
+    public class Links__1 {
+
+        @SerializedName("self")
+        @Expose
+        private List<Self__1> self = null;
+        @SerializedName("collection")
+        @Expose
+        private List<Collection__1> collection = null;
+
+        public List<Self__1> getSelf() {
+            return self;
+        }
+
+        public void setSelf(List<Self__1> self) {
+            this.self = self;
+        }
+
+        public List<Collection__1> getCollection() {
+            return collection;
+        }
+
+        public void setCollection(List<Collection__1> collection) {
+            this.collection = collection;
+        }
+
+    }
+
+    public class Links__2 {
+
+        @SerializedName("self")
+        @Expose
+        private List<Self__2> self = null;
+        @SerializedName("collection")
+        @Expose
+        private List<Collection__2> collection = null;
+        @SerializedName("about")
+        @Expose
+        private List<About__1> about = null;
+        @SerializedName("author")
+        @Expose
+        private List<Author__2> author = null;
+        @SerializedName("replies")
+        @Expose
+        private List<Reply__1> replies = null;
+
+        public List<Self__2> getSelf() {
+            return self;
+        }
+
+        public void setSelf(List<Self__2> self) {
+            this.self = self;
+        }
+
+        public List<Collection__2> getCollection() {
+            return collection;
+        }
+
+        public void setCollection(List<Collection__2> collection) {
+            this.collection = collection;
+        }
+
+        public List<About__1> getAbout() {
+            return about;
+        }
+
+        public void setAbout(List<About__1> about) {
+            this.about = about;
+        }
+
+        public List<Author__2> getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(List<Author__2> author) {
+            this.author = author;
+        }
+
+        public List<Reply__1> getReplies() {
+            return replies;
+        }
+
+        public void setReplies(List<Reply__1> replies) {
+            this.replies = replies;
+        }
+
+    }
+
+    public class Links__3 {
+
+        @SerializedName("self")
+        @Expose
+        private List<Self__3> self = null;
+        @SerializedName("collection")
+        @Expose
+        private List<Collection__3> collection = null;
+        @SerializedName("about")
+        @Expose
+        private List<About__2> about = null;
+        @SerializedName("wp:post_type")
+        @Expose
+        private List<WpPostType> wpPostType = null;
+        @SerializedName("curies")
+        @Expose
+        private List<Cury__1> curies = null;
+        @SerializedName("up")
+        @Expose
+        private List<Up> up = null;
+
+        public List<Self__3> getSelf() {
+            return self;
+        }
+
+        public void setSelf(List<Self__3> self) {
+            this.self = self;
+        }
+
+        public List<Collection__3> getCollection() {
+            return collection;
+        }
+
+        public void setCollection(List<Collection__3> collection) {
+            this.collection = collection;
+        }
+
+        public List<About__2> getAbout() {
+            return about;
+        }
+
+        public void setAbout(List<About__2> about) {
+            this.about = about;
+        }
+
+        public List<WpPostType> getWpPostType() {
+            return wpPostType;
+        }
+
+        public void setWpPostType(List<WpPostType> wpPostType) {
+            this.wpPostType = wpPostType;
+        }
+
+        public List<Cury__1> getCuries() {
+            return curies;
+        }
+
+        public void setCuries(List<Cury__1> curies) {
+            this.curies = curies;
+        }
+
+        public List<Up> getUp() {
+            return up;
+        }
+
+        public void setUp(List<Up> up) {
+            this.up = up;
+        }
+
+    }
+
+    public class MediaDetails {
+
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("sizes")
+        @Expose
+        private Sizes sizes;
+        @SerializedName("image_meta")
+        @Expose
+        private ImageMeta imageMeta;
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Sizes getSizes() {
+            return sizes;
+        }
+
+        public void setSizes(Sizes sizes) {
+            this.sizes = sizes;
+        }
+
+        public ImageMeta getImageMeta() {
+            return imageMeta;
+        }
+
+        public void setImageMeta(ImageMeta imageMeta) {
+            this.imageMeta = imageMeta;
+        }
+
+    }
+
+    public class Medium {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Reply {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Reply__1 {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Self {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Self__1 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Self__2 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Self__3 {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class Sizes {
+
+        @SerializedName("medium")
+        @Expose
+        private Medium medium;
+        @SerializedName("thumbnail")
+        @Expose
+        private Thumbnail thumbnail;
+        @SerializedName("full")
+        @Expose
+        private Full full;
+
+        public Medium getMedium() {
+            return medium;
+        }
+
+        public void setMedium(Medium medium) {
+            this.medium = medium;
+        }
+
+        public Thumbnail getThumbnail() {
+            return thumbnail;
+        }
+
+        public void setThumbnail(Thumbnail thumbnail) {
+            this.thumbnail = thumbnail;
+        }
+
+        public Full getFull() {
+            return full;
+        }
+
+        public void setFull(Full full) {
+            this.full = full;
+        }
+
+    }
+
+    public class Thumbnail {
+
+        @SerializedName("file")
+        @Expose
+        private String file;
+        @SerializedName("width")
+        @Expose
+        private Integer width;
+        @SerializedName("height")
+        @Expose
+        private Integer height;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+
+        public String getFile() {
+            return file;
+        }
+
+        public void setFile(String file) {
+            this.file = file;
+        }
+
+        public Integer getWidth() {
+            return width;
+        }
+
+        public void setWidth(Integer width) {
+            this.width = width;
+        }
+
+        public Integer getHeight() {
+            return height;
+        }
+
+        public void setHeight(Integer height) {
+            this.height = height;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+    }
+
+    public class Title {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class Title__1 {
+
+        @SerializedName("rendered")
+        @Expose
+        private String rendered;
+
+        public String getRendered() {
+            return rendered;
+        }
+
+        public void setRendered(String rendered) {
+            this.rendered = rendered;
+        }
+
+    }
+
+    public class Up {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class VersionHistory {
+
+        @SerializedName("count")
+        @Expose
+        private Integer count;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Integer getCount() {
+            return count;
+        }
+
+        public void setCount(Integer count) {
+            this.count = count;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class WpAttachment {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class WpFeaturedmedium {
+
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class WpFeaturedmedium__1 {
+
+        @SerializedName("id")
+        @Expose
+        private Integer id;
+        @SerializedName("date")
+        @Expose
+        private String date;
+        @SerializedName("slug")
+        @Expose
+        private String slug;
+        @SerializedName("type")
+        @Expose
+        private String type;
+        @SerializedName("link")
+        @Expose
+        private String link;
+        @SerializedName("title")
+        @Expose
+        private Title__1 title;
+        @SerializedName("author")
+        @Expose
+        private Integer author;
+        @SerializedName("caption")
+        @Expose
+        private Caption caption;
+        @SerializedName("alt_text")
+        @Expose
+        private String altText;
+        @SerializedName("media_type")
+        @Expose
+        private String mediaType;
+        @SerializedName("mime_type")
+        @Expose
+        private String mimeType;
+        @SerializedName("media_details")
+        @Expose
+        private MediaDetails mediaDetails;
+        @SerializedName("source_url")
+        @Expose
+        private String sourceUrl;
+        @SerializedName("_links")
+        @Expose
+        private Links__2 links;
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public String getDate() {
+            return date;
+        }
+
+        public void setDate(String date) {
+            this.date = date;
+        }
+
+        public String getSlug() {
+            return slug;
+        }
+
+        public void setSlug(String slug) {
+            this.slug = slug;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+
+        public String getLink() {
+            return link;
+        }
+
+        public void setLink(String link) {
+            this.link = link;
+        }
+
+        public Title__1 getTitle() {
+            return title;
+        }
+
+        public void setTitle(Title__1 title) {
+            this.title = title;
+        }
+
+        public Integer getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(Integer author) {
+            this.author = author;
+        }
+
+        public Caption getCaption() {
+            return caption;
+        }
+
+        public void setCaption(Caption caption) {
+            this.caption = caption;
+        }
+
+        public String getAltText() {
+            return altText;
+        }
+
+        public void setAltText(String altText) {
+            this.altText = altText;
+        }
+
+        public String getMediaType() {
+            return mediaType;
+        }
+
+        public void setMediaType(String mediaType) {
+            this.mediaType = mediaType;
+        }
+
+        public String getMimeType() {
+            return mimeType;
+        }
+
+        public void setMimeType(String mimeType) {
+            this.mimeType = mimeType;
+        }
+
+        public MediaDetails getMediaDetails() {
+            return mediaDetails;
+        }
+
+        public void setMediaDetails(MediaDetails mediaDetails) {
+            this.mediaDetails = mediaDetails;
+        }
+
+        public String getSourceUrl() {
+            return sourceUrl;
+        }
+
+        public void setSourceUrl(String sourceUrl) {
+            this.sourceUrl = sourceUrl;
+        }
+
+        public Links__2 getLinks() {
+            return links;
+        }
+
+        public void setLinks(Links__2 links) {
+            this.links = links;
+        }
+
+    }
+
+    public class WpPostType {
+
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class WpTerm {
+
+        @SerializedName("taxonomy")
+        @Expose
+        private String taxonomy;
+        @SerializedName("embeddable")
+        @Expose
+        private Boolean embeddable;
+        @SerializedName("href")
+        @Expose
+        private String href;
+
+        public String getTaxonomy() {
+            return taxonomy;
+        }
+
+        public void setTaxonomy(String taxonomy) {
+            this.taxonomy = taxonomy;
+        }
+
+        public Boolean getEmbeddable() {
+            return embeddable;
+        }
+
+        public void setEmbeddable(Boolean embeddable) {
+            this.embeddable = embeddable;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+    }
+
+    public class WpTerm__1 {
+
+        @SerializedName("id")
+        @Expose
+        private Integer id;
+        @SerializedName("link")
+        @Expose
+        private String link;
+        @SerializedName("name")
+        @Expose
+        private String name;
+        @SerializedName("slug")
+        @Expose
+        private String slug;
+        @SerializedName("taxonomy")
+        @Expose
+        private String taxonomy;
+        @SerializedName("_links")
+        @Expose
+        private Links__3 links;
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public String getLink() {
+            return link;
+        }
+
+        public void setLink(String link) {
+            this.link = link;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getSlug() {
+            return slug;
+        }
+
+        public void setSlug(String slug) {
+            this.slug = slug;
+        }
+
+        public String getTaxonomy() {
+            return taxonomy;
+        }
+
+        public void setTaxonomy(String taxonomy) {
+            this.taxonomy = taxonomy;
+        }
+
+        public Links__3 getLinks() {
+            return links;
+        }
+
+        public void setLinks(Links__3 links) {
+            this.links = links;
+        }
+
+    }
+}

+ 1 - 1
app/src/main/java/club/thepenguins/android/utils/Constants.java

@@ -2,6 +2,6 @@ package club.thepenguins.android.utils;
 
 public interface Constants {
 
-    String BaseUrl = "";
+    String BaseUrl = "https://thepenguins.club/";
 
 }

+ 18 - 9
app/src/main/res/layout/activity_main.xml

@@ -4,15 +4,24 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context=".MainActivity">
+    tools:context=".activities.MainActivity">
 
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="Hello World!"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
 
+        <androidx.recyclerview.widget.RecyclerView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:id="@+id/recycler_view">
+
+        </androidx.recyclerview.widget.RecyclerView>
+
+        <ProgressBar
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:id="@+id/progressbar"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true" />
+    </RelativeLayout>
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 21 - 0
app/src/main/res/layout/activity_post_details.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".activities.PostDetailsActivity">
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
+
+   <WebView
+       android:id="@+id/webview"
+       android:layout_width="match_parent"
+       android:layout_height="wrap_content"
+       >
+
+   </WebView>
+    </ScrollView>
+</RelativeLayout>

+ 58 - 0
app/src/main/res/layout/post_item.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:orientation="horizontal"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_margin="5dp"
+    android:id="@+id/card"
+    app:cardElevation="5dp">
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="200dp"
+            android:src="@drawable/ic_launcher_background"
+            android:id="@+id/Icon"
+            android:layout_margin="5dp"
+            />
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:gravity="center_vertical"
+            android:paddingTop="10dp"
+            android:layout_below="@+id/Icon">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textStyle="bold"
+                android:gravity="left"
+                android:id="@+id/title"
+                android:padding="5dp"
+                android:layout_marginBottom="5dp"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="left"
+                android:id="@+id/subtitle"
+                android:padding="5dp"
+                android:layout_marginBottom="5dp"
+                android:maxLines="5"
+                android:lineSpacingExtra="2dp"/>
+
+        </LinearLayout>
+
+
+    </RelativeLayout>
+
+
+
+</androidx.cardview.widget.CardView>

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -7,4 +7,5 @@
     <color name="teal_700">#FF018786</color>
     <color name="black">#FF000000</color>
     <color name="white">#FFFFFFFF</color>
+    <color name="preloadColor">#B9B5BD</color>
 </resources>