|
@ -24,6 +24,7 @@ import android.widget.FrameLayout; |
|
|
import android.widget.ImageButton; |
|
|
import android.widget.ImageButton; |
|
|
import android.widget.LinearLayout; |
|
|
import android.widget.LinearLayout; |
|
|
import android.widget.ProgressBar; |
|
|
import android.widget.ProgressBar; |
|
|
|
|
|
import android.widget.RelativeLayout; |
|
|
import android.widget.TextView; |
|
|
import android.widget.TextView; |
|
|
import android.widget.Toast; |
|
|
import android.widget.Toast; |
|
|
|
|
|
|
|
@ -35,6 +36,7 @@ import org.jsoup.nodes.Element; |
|
|
import org.jsoup.select.Elements; |
|
|
import org.jsoup.select.Elements; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.Arrays; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Objects; |
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@ -74,6 +76,7 @@ public class TopicActivity extends BaseActivity { |
|
|
/* --Topic's pages end-- */ |
|
|
/* --Topic's pages end-- */ |
|
|
/* --Thumbnail-- */ |
|
|
/* --Thumbnail-- */ |
|
|
private static final int THUMBNAIL_SIZE = 80; |
|
|
private static final int THUMBNAIL_SIZE = 80; |
|
|
|
|
|
private static final int THUMBNAIL_PADDING = 16; |
|
|
private ImageLoader imageLoader = ImageController.getInstance().getImageLoader(); |
|
|
private ImageLoader imageLoader = ImageController.getInstance().getImageLoader(); |
|
|
/* --Thumbnail end-- */ |
|
|
/* --Thumbnail end-- */ |
|
|
|
|
|
|
|
@ -343,12 +346,24 @@ public class TopicActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
for (Element item : rows) { //For every post
|
|
|
for (Element item : rows) { //For every post
|
|
|
//Variables to pass
|
|
|
//Variables to pass
|
|
|
String p_userName, p_thumbnailUrl, p_subject, p_post, p_postDate; |
|
|
String p_userName, p_thumbnailUrl, p_subject, p_post, p_postDate, p_rank, |
|
|
int p_postNum, p_postIndex; |
|
|
p_specialRank, p_gender, p_personalText, p_numberOfPosts, p_urlOfStars; |
|
|
|
|
|
int p_postNum, p_postIndex, p_numberOfStars; |
|
|
|
|
|
boolean p_isDeleted = false; |
|
|
|
|
|
|
|
|
|
|
|
//Initialize variables
|
|
|
|
|
|
p_rank = "Rank"; |
|
|
|
|
|
p_specialRank = "Special rank"; |
|
|
|
|
|
p_gender = ""; |
|
|
|
|
|
p_personalText = ""; |
|
|
|
|
|
p_numberOfPosts = ""; |
|
|
|
|
|
p_urlOfStars = ""; |
|
|
|
|
|
p_numberOfStars = 0; |
|
|
|
|
|
|
|
|
//Find the Username
|
|
|
//Find the Username
|
|
|
Element userName = item.select("a[title^=View the profile of]").first(); |
|
|
Element userName = item.select("a[title^=View the profile of]").first(); |
|
|
if (userName == null) { //Deleted profile
|
|
|
if (userName == null) { //Deleted profile
|
|
|
|
|
|
p_isDeleted = true; |
|
|
p_userName = item |
|
|
p_userName = item |
|
|
.select("td:has(div.smalltext:containsOwn(Guest))[style^=overflow]") |
|
|
.select("td:has(div.smalltext:containsOwn(Guest))[style^=overflow]") |
|
|
.first().text(); |
|
|
.first().text(); |
|
@ -376,7 +391,7 @@ public class TopicActivity extends BaseActivity { |
|
|
Element postDate = item.select("div.smalltext:matches(on:)").first(); |
|
|
Element postDate = item.select("div.smalltext:matches(on:)").first(); |
|
|
p_postDate = postDate.text(); |
|
|
p_postDate = postDate.text(); |
|
|
p_postDate = p_postDate.substring(p_postDate.indexOf("on:") + 4 |
|
|
p_postDate = p_postDate.substring(p_postDate.indexOf("on:") + 4 |
|
|
,p_postDate.indexOf(" »")); |
|
|
, p_postDate.indexOf(" »")); |
|
|
|
|
|
|
|
|
//Find post's number
|
|
|
//Find post's number
|
|
|
Element postNum = item.select("div.smalltext:matches(Reply #)").first(); |
|
|
Element postNum = item.select("div.smalltext:matches(Reply #)").first(); |
|
@ -389,16 +404,79 @@ public class TopicActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
//Find post's index
|
|
|
//Find post's index
|
|
|
Element postIndex = item.select("a[name^=msg]").first(); |
|
|
Element postIndex = item.select("a[name^=msg]").first(); |
|
|
if(postIndex == null) |
|
|
if (postIndex == null) |
|
|
p_postIndex = NO_INDEX; |
|
|
p_postIndex = NO_INDEX; |
|
|
else { |
|
|
else { |
|
|
String tmp = postIndex.attr("name"); |
|
|
String tmp = postIndex.attr("name"); |
|
|
p_postIndex = Integer.parseInt(tmp.substring(tmp.indexOf("msg") + 3)); |
|
|
p_postIndex = Integer.parseInt(tmp.substring(tmp.indexOf("msg") + 3)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Add new post in postsList
|
|
|
if (!p_isDeleted) { //Active user
|
|
|
|
|
|
//Get extra info
|
|
|
|
|
|
int postsLineIndex = -1; |
|
|
|
|
|
int starsLineIndex = -1; |
|
|
|
|
|
|
|
|
|
|
|
Element info = userName.parent().nextElementSibling(); //Get sibling "div"
|
|
|
|
|
|
List<String> infoList = Arrays.asList(info.html().split("<br>")); |
|
|
|
|
|
|
|
|
|
|
|
for (String line : infoList) { |
|
|
|
|
|
Log.i(TAG, line); |
|
|
|
|
|
if (line.contains("Posts:")) { |
|
|
|
|
|
postsLineIndex = infoList.indexOf(line); |
|
|
|
|
|
//Remove any line breaks and spaces on the start and end
|
|
|
|
|
|
p_numberOfPosts = p_personalText.replace("\n", "") |
|
|
|
|
|
.replace("\r", "").trim(); |
|
|
|
|
|
} |
|
|
|
|
|
if (line.contains("Gender:")) { |
|
|
|
|
|
if (line.contains("alt=\"Male\"")) |
|
|
|
|
|
p_gender = "Gender: Male"; |
|
|
|
|
|
else |
|
|
|
|
|
p_gender = "Gender: Female"; |
|
|
|
|
|
} |
|
|
|
|
|
if (line.contains("alt=\"*\"")) { |
|
|
|
|
|
starsLineIndex = infoList.indexOf(line); |
|
|
|
|
|
Document starsHtml = Jsoup.parse(line); |
|
|
|
|
|
p_numberOfStars = starsHtml.select("img[alt]").size(); |
|
|
|
|
|
p_urlOfStars = starsHtml.select("img[alt]").first().attr("abs:src"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//If this member has no stars yet ==> New member,
|
|
|
|
|
|
//or is just a member
|
|
|
|
|
|
if (starsLineIndex == -1 || starsLineIndex == 1) { |
|
|
|
|
|
//In this case:
|
|
|
|
|
|
p_rank = infoList.get(0).trim(); //First line has the rank
|
|
|
|
|
|
p_specialRank = null; //They don't have a special rank
|
|
|
|
|
|
} else if (starsLineIndex == 2) { //This member has a special rank
|
|
|
|
|
|
p_specialRank = infoList.get(0).trim(); //First line has the special rank
|
|
|
|
|
|
p_rank = infoList.get(1).trim(); //Second line has the rank
|
|
|
|
|
|
} |
|
|
|
|
|
for (int i = postsLineIndex + 1; i < infoList.size() - 1; ++i) { |
|
|
|
|
|
//Search under "Posts:"
|
|
|
|
|
|
//and above "Personal Message", "View Profile" etc buttons
|
|
|
|
|
|
|
|
|
|
|
|
String thisLine = infoList.get(i); |
|
|
|
|
|
//If this line isn't empty and doesn't contain user's avatar
|
|
|
|
|
|
if (!Objects.equals(thisLine, "") && thisLine != null |
|
|
|
|
|
&& !Objects.equals(thisLine, " \n") |
|
|
|
|
|
&& !thisLine.contains("avatar")) { |
|
|
|
|
|
p_personalText = thisLine; //Then this line has user's personal text
|
|
|
|
|
|
//Remove any line breaks and spaces on the start and end
|
|
|
|
|
|
p_personalText = p_personalText.replace("\n", "") |
|
|
|
|
|
.replace("\r", "").trim(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//Add new post in postsList, extended information needed
|
|
|
|
|
|
postsList.add(new Post(p_thumbnailUrl, p_userName, p_subject, p_post |
|
|
|
|
|
, p_postIndex, p_postNum, p_postDate, p_isDeleted, p_rank |
|
|
|
|
|
, p_specialRank, p_gender, p_numberOfPosts, p_personalText |
|
|
|
|
|
, p_urlOfStars, p_numberOfStars)); |
|
|
|
|
|
|
|
|
|
|
|
} else{ //Deleted user
|
|
|
|
|
|
//Add new post in postsList, only standard information needed
|
|
|
postsList.add(new Post(p_thumbnailUrl, p_userName, p_subject |
|
|
postsList.add(new Post(p_thumbnailUrl, p_userName, p_subject |
|
|
, p_post, p_postDate, p_postNum, p_postIndex)); |
|
|
, p_post, p_postIndex, p_postNum, p_postDate, p_isDeleted)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/* Parse method end */ |
|
|
/* Parse method end */ |
|
@ -435,7 +513,9 @@ public class TopicActivity extends BaseActivity { |
|
|
TextView username = (TextView) convertView.findViewById(R.id.username); |
|
|
TextView username = (TextView) convertView.findViewById(R.id.username); |
|
|
TextView subject = (TextView) convertView.findViewById(R.id.subject); |
|
|
TextView subject = (TextView) convertView.findViewById(R.id.subject); |
|
|
final WebView post = (WebView) convertView.findViewById(R.id.post); |
|
|
final WebView post = (WebView) convertView.findViewById(R.id.post); |
|
|
CardView cardView = (CardView) convertView.findViewById(R.id.card_view); |
|
|
final CardView cardView = (CardView) convertView.findViewById(R.id.card_view); |
|
|
|
|
|
RelativeLayout header = (RelativeLayout) convertView.findViewById(R.id.header); |
|
|
|
|
|
final LinearLayout userExtraInfo = (LinearLayout) convertView.findViewById(R.id.user_extra_info); |
|
|
|
|
|
|
|
|
//Post's WebView parameters set
|
|
|
//Post's WebView parameters set
|
|
|
post.setClickable(true); |
|
|
post.setClickable(true); |
|
@ -462,6 +542,8 @@ public class TopicActivity extends BaseActivity { |
|
|
//Post's index number set
|
|
|
//Post's index number set
|
|
|
if (item.getPostNumber() != 0) |
|
|
if (item.getPostNumber() != 0) |
|
|
postNum.setText("#" + item.getPostNumber()); |
|
|
postNum.setText("#" + item.getPostNumber()); |
|
|
|
|
|
else |
|
|
|
|
|
postNum.setText(""); |
|
|
|
|
|
|
|
|
//Subject set
|
|
|
//Subject set
|
|
|
subject.setText(item.getSubject()); |
|
|
subject.setText(item.getSubject()); |
|
@ -469,13 +551,79 @@ public class TopicActivity extends BaseActivity { |
|
|
//Post's text set
|
|
|
//Post's text set
|
|
|
post.loadDataWithBaseURL("file:///android_asset/", item.getContent(), "text/html", "UTF-8", null); |
|
|
post.loadDataWithBaseURL("file:///android_asset/", item.getContent(), "text/html", "UTF-8", null); |
|
|
|
|
|
|
|
|
|
|
|
if(!item.isDeleted()) { //Set extra info
|
|
|
|
|
|
//Variables for Graphics
|
|
|
|
|
|
TextView g_specialRank, g_rank, g_gender, g_numberOfPosts, g_personalText; |
|
|
|
|
|
LinearLayout g_stars_holder = (LinearLayout) convertView.findViewById(R.id.stars); |
|
|
|
|
|
|
|
|
|
|
|
//Variables for content
|
|
|
|
|
|
String c_specialRank = item.getSpecialRank() |
|
|
|
|
|
, c_rank = item.getRank() |
|
|
|
|
|
, c_gender = item.getGender() |
|
|
|
|
|
, c_numberOfPosts = item.getNumberOfPosts() |
|
|
|
|
|
, c_personalText = item.getPersonalText() |
|
|
|
|
|
, c_urlOfStars = item.getUrlOfStars(); |
|
|
|
|
|
int c_numberOfStars = item.getNumberOfStars(); |
|
|
|
|
|
|
|
|
|
|
|
if(!Objects.equals(c_specialRank, "") && c_specialRank != null){ |
|
|
|
|
|
g_specialRank = (TextView) convertView.findViewById(R.id.special_rank); |
|
|
|
|
|
g_specialRank.setText(c_specialRank); |
|
|
|
|
|
g_specialRank.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
if(!Objects.equals(c_rank, "") && c_rank != null){ |
|
|
|
|
|
g_rank = (TextView) convertView.findViewById(R.id.rank); |
|
|
|
|
|
g_rank.setText(c_rank); |
|
|
|
|
|
g_rank.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
if(!Objects.equals(c_gender, "") && c_gender != null){ |
|
|
|
|
|
g_gender = (TextView) convertView.findViewById(R.id.gender); |
|
|
|
|
|
g_gender.setText(c_gender); |
|
|
|
|
|
g_gender.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
if(!Objects.equals(c_numberOfPosts, "") && c_numberOfPosts != null){ |
|
|
|
|
|
g_numberOfPosts = (TextView) convertView.findViewById(R.id.number_of_posts); |
|
|
|
|
|
g_numberOfPosts.setText(c_numberOfPosts); |
|
|
|
|
|
g_numberOfPosts.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
if(!Objects.equals(c_personalText, "") && c_personalText != null){ |
|
|
|
|
|
g_personalText = (TextView) convertView.findViewById(R.id.personal_text); |
|
|
|
|
|
g_personalText.setText("\"" + c_personalText + "\""); |
|
|
|
|
|
g_personalText.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
for(int i=0; i<c_numberOfStars; ++i){ |
|
|
|
|
|
CircularNetworkImageView star = new CircularNetworkImageView(this); |
|
|
|
|
|
star.setImageUrl(c_urlOfStars, imageLoader); |
|
|
|
|
|
|
|
|
|
|
|
//Remove spacing between stars...
|
|
|
|
|
|
//Don't know why this is happening in the first place
|
|
|
|
|
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( |
|
|
|
|
|
LinearLayout.LayoutParams.WRAP_CONTENT, |
|
|
|
|
|
LinearLayout.LayoutParams.WRAP_CONTENT |
|
|
|
|
|
); |
|
|
|
|
|
params.setMargins(-30, 0, -30, 0); |
|
|
|
|
|
star.setLayoutParams(params); |
|
|
|
|
|
|
|
|
|
|
|
g_stars_holder.addView(star, 0); |
|
|
|
|
|
g_stars_holder.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* --Header expand/collapse"-like functionality-- */ |
|
|
|
|
|
|
|
|
|
|
|
header.setOnClickListener(new View.OnClickListener(){ |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(View v){ |
|
|
|
|
|
animateUserExtraInfoVisibility(userExtraInfo); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* --"Card expand/collapse"-like functionality-- */ |
|
|
/* --"Card expand/collapse"-like functionality-- */ |
|
|
if (item.getPostNumber() != 0) { |
|
|
|
|
|
//Should expand/collapse when card is touched
|
|
|
//Should expand/collapse when card is touched
|
|
|
cardView.setOnClickListener(new View.OnClickListener() { |
|
|
cardView.setOnClickListener(new View.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(View v) { |
|
|
public void onClick(View v) { |
|
|
visibilityChangeAnimate(cardExpandable); |
|
|
animatePostExtraInfoVisibility(cardExpandable); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -511,11 +659,12 @@ public class TopicActivity extends BaseActivity { |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
|
|
|
//Expand/Collapse card
|
|
|
//Expand/Collapse card
|
|
|
visibilityChangeAnimate(cardExpandable); |
|
|
animatePostExtraInfoVisibility(cardExpandable); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case MotionEvent.ACTION_MOVE: |
|
|
case MotionEvent.ACTION_MOVE: |
|
|
if (fingerState == FINGER_TOUCHED || fingerState == FINGER_DRAGGING) fingerState = FINGER_DRAGGING; |
|
|
if (fingerState == FINGER_TOUCHED || fingerState == FINGER_DRAGGING) |
|
|
|
|
|
fingerState = FINGER_DRAGGING; |
|
|
else fingerState = FINGER_UNDEFINED; |
|
|
else fingerState = FINGER_UNDEFINED; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
@ -526,7 +675,7 @@ public class TopicActivity extends BaseActivity { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
/* --"Card expand/collapse"-like functionality end-- */ |
|
|
/* --"Card expand/collapse"-like functionality end-- */ |
|
|
|
|
|
|
|
|
//Add view to the linear layout that holds all posts
|
|
|
//Add view to the linear layout that holds all posts
|
|
@ -542,18 +691,60 @@ public class TopicActivity extends BaseActivity { |
|
|
} |
|
|
} |
|
|
//--------------------------------------POPULATE UI METHOD END--------------------------------------
|
|
|
//--------------------------------------POPULATE UI METHOD END--------------------------------------
|
|
|
|
|
|
|
|
|
//---------------------------------VISIBILITY CHANGE ANIMATE METHOD---------------------------------
|
|
|
//--------------------------POST'S INFO VISIBILITY CHANGE ANIMATION METHOD--------------------------
|
|
|
//Method that animates views visibility changes
|
|
|
//Method that animates views visibility changes
|
|
|
private void visibilityChangeAnimate(final View mCard){ |
|
|
private void animatePostExtraInfoVisibility(final View dateAndPostNum){ |
|
|
//If the view is gone fade it in
|
|
|
//If the view is gone fade it in
|
|
|
if (mCard.getVisibility() == View.GONE) { |
|
|
if (dateAndPostNum.getVisibility() == View.GONE) { |
|
|
mCard.clearAnimation(); |
|
|
dateAndPostNum.clearAnimation(); |
|
|
// Prepare the View for the animation
|
|
|
// Prepare the View for the animation
|
|
|
mCard.setVisibility(View.VISIBLE); |
|
|
dateAndPostNum.setVisibility(View.VISIBLE); |
|
|
mCard.setAlpha(0.0f); |
|
|
dateAndPostNum.setAlpha(0.0f); |
|
|
|
|
|
|
|
|
|
|
|
// Start the animation
|
|
|
|
|
|
dateAndPostNum.animate() |
|
|
|
|
|
.translationY(0) |
|
|
|
|
|
.alpha(1.0f) |
|
|
|
|
|
.setDuration(300) |
|
|
|
|
|
.setListener(new AnimatorListenerAdapter() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onAnimationEnd(Animator animation) { |
|
|
|
|
|
super.onAnimationEnd(animation); |
|
|
|
|
|
dateAndPostNum.setVisibility(View.VISIBLE); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
//If the view is visible fade it out
|
|
|
|
|
|
else { |
|
|
|
|
|
dateAndPostNum.clearAnimation(); |
|
|
|
|
|
|
|
|
// Start the animation
|
|
|
// Start the animation
|
|
|
mCard.animate() |
|
|
dateAndPostNum.animate() |
|
|
|
|
|
.translationY(dateAndPostNum.getHeight()) |
|
|
|
|
|
.alpha(0.0f) |
|
|
|
|
|
.setDuration(300) |
|
|
|
|
|
.setListener(new AnimatorListenerAdapter() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onAnimationEnd(Animator animation) { |
|
|
|
|
|
super.onAnimationEnd(animation); |
|
|
|
|
|
dateAndPostNum.setVisibility(View.GONE); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//------------------------POST'S INFO VISIBILITY CHANGE ANIMATION METHOD END------------------------
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------USER'S INFO VISIBILITY CHANGE ANIMATION METHOD--------------------------
|
|
|
|
|
|
//Method that animates views visibility changes
|
|
|
|
|
|
private void animateUserExtraInfoVisibility(final View userExtra){ |
|
|
|
|
|
//If the view is gone fade it in
|
|
|
|
|
|
if (userExtra.getVisibility() == View.GONE) { |
|
|
|
|
|
|
|
|
|
|
|
userExtra.clearAnimation(); |
|
|
|
|
|
userExtra.setVisibility(View.VISIBLE); |
|
|
|
|
|
userExtra.setAlpha(0.0f); |
|
|
|
|
|
|
|
|
|
|
|
userExtra.animate() |
|
|
.translationY(0) |
|
|
.translationY(0) |
|
|
.alpha(1.0f) |
|
|
.alpha(1.0f) |
|
|
.setDuration(300) |
|
|
.setDuration(300) |
|
@ -561,29 +752,29 @@ public class TopicActivity extends BaseActivity { |
|
|
@Override |
|
|
@Override |
|
|
public void onAnimationEnd(Animator animation) { |
|
|
public void onAnimationEnd(Animator animation) { |
|
|
super.onAnimationEnd(animation); |
|
|
super.onAnimationEnd(animation); |
|
|
mCard.setVisibility(View.VISIBLE); |
|
|
userExtra.setVisibility(View.VISIBLE); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
//If the view is visible fade it out
|
|
|
//If the view is visible fade it out
|
|
|
else { |
|
|
else { |
|
|
mCard.clearAnimation(); |
|
|
userExtra.clearAnimation(); |
|
|
|
|
|
|
|
|
// Start the animation
|
|
|
// Start the animation
|
|
|
mCard.animate() |
|
|
userExtra.animate() |
|
|
.translationY(mCard.getHeight()) |
|
|
.translationY(userExtra.getHeight()) |
|
|
.alpha(0.0f) |
|
|
.alpha(0.0f) |
|
|
.setDuration(300) |
|
|
.setDuration(300) |
|
|
.setListener(new AnimatorListenerAdapter() { |
|
|
.setListener(new AnimatorListenerAdapter() { |
|
|
@Override |
|
|
@Override |
|
|
public void onAnimationEnd(Animator animation) { |
|
|
public void onAnimationEnd(Animator animation) { |
|
|
super.onAnimationEnd(animation); |
|
|
super.onAnimationEnd(animation); |
|
|
mCard.setVisibility(View.GONE); |
|
|
userExtra.setVisibility(View.GONE); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//-------------------------------VISIBILITY CHANGE ANIMATE METHOD END-------------------------------
|
|
|
//------------------------POST'S INFO VISIBILITY CHANGE ANIMATION METHOD END------------------------
|
|
|
|
|
|
|
|
|
//--------------------------------------CUSTOM WEBVIEW CLIENT---------------------------------------
|
|
|
//--------------------------------------CUSTOM WEBVIEW CLIENT---------------------------------------
|
|
|
private class LinkLauncher extends WebViewClient { |
|
|
private class LinkLauncher extends WebViewClient { |
|
|