reduce large links in branches and releases to small text with links.
Signed-off-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
		@@ -1,12 +1,13 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.text.Html;
 | 
			
		||||
import android.text.method.LinkMovementMethod;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.helpers.UrlHelper;
 | 
			
		||||
import org.mian.gitnex.models.Branches;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -66,7 +67,9 @@ public class BranchesAdapter extends RecyclerView.Adapter<BranchesAdapter.Branch
 | 
			
		||||
            holder.branchCommitAuthor.setText(mCtx.getResources().getString(R.string.commitAuthor, currentItem.getCommit().getAuthor().getUsername()));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        holder.branchCommitHash.setText(mCtx.getResources().getString(R.string.commitHash, "", currentItem.getCommit().getUrl()));
 | 
			
		||||
        holder.branchCommitHash.setText(
 | 
			
		||||
                Html.fromHtml("<a href='" + currentItem.getCommit().getUrl() + "'>" + mCtx.getResources().getString(R.string.commitLinkBranchesTab) + "</a> "));
 | 
			
		||||
        holder.branchCommitHash.setMovementMethod(LinkMovementMethod.getInstance());
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@ package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.graphics.Color;
 | 
			
		||||
import android.text.Html;
 | 
			
		||||
import android.text.method.LinkMovementMethod;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
@@ -139,8 +141,14 @@ public class ReleasesAdapter extends RecyclerView.Adapter<ReleasesAdapter.Releas
 | 
			
		||||
        else {
 | 
			
		||||
            holder.releaseDescription.setVisibility(View.GONE);
 | 
			
		||||
        }
 | 
			
		||||
        holder.releaseZipDownload.setText(currentItem.getZipball_url());
 | 
			
		||||
        holder.releaseTarDownload.setText(currentItem.getTarball_url());
 | 
			
		||||
 | 
			
		||||
        holder.releaseZipDownload.setText(
 | 
			
		||||
                Html.fromHtml("<a href='" + currentItem.getZipball_url() + "'>" + mCtx.getResources().getString(R.string.zipArchiveDownloadReleasesTab) + "</a> "));
 | 
			
		||||
        holder.releaseZipDownload.setMovementMethod(LinkMovementMethod.getInstance());
 | 
			
		||||
 | 
			
		||||
        holder.releaseTarDownload.setText(
 | 
			
		||||
                Html.fromHtml("<a href='" + currentItem.getTarball_url() + "'>" + mCtx.getResources().getString(R.string.tarArchiveDownloadReleasesTab) + "</a> "));
 | 
			
		||||
        holder.releaseTarDownload.setMovementMethod(LinkMovementMethod.getInstance());
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user