Improve files ui and bug fix encoding in names (#834)
Minor UI and performance improvements. use one image and remove relativelayout Fix html codes in name, fix org fragment tab count to load Members Improve files ui Co-authored-by: opyale <opyale@noreply.codeberg.org> Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/834 Reviewed-by: opyale <opyale@noreply.codeberg.org> Co-Authored-By: M M Arif <mmarif@noreply.codeberg.org> Co-Committed-By: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
parent
57ce453661
commit
47d6c68410
@ -5,6 +5,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@ -268,7 +269,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
|||||||
|
|
||||||
if(!userFullNameNav.equals("")) {
|
if(!userFullNameNav.equals("")) {
|
||||||
|
|
||||||
userFullName.setText(userFullNameNav);
|
userFullName.setText(Html.fromHtml(userFullNameNav));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!userAvatarNav.equals("")) {
|
if(!userAvatarNav.equals("")) {
|
||||||
|
@ -212,7 +212,7 @@ public class OrganizationDetailActivity extends BaseActivity implements BottomSh
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
return 4;
|
return 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -68,18 +69,22 @@ public class AdminGetUsersAdapter extends RecyclerView.Adapter<AdminGetUsersAdap
|
|||||||
UserInfo currentItem = usersList.get(position);
|
UserInfo currentItem = usersList.get(position);
|
||||||
|
|
||||||
if(!currentItem.getFullname().equals("")) {
|
if(!currentItem.getFullname().equals("")) {
|
||||||
holder.userFullName.setText(currentItem.getFullname());
|
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
holder.userName.setVisibility(View.GONE);
|
holder.userName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getEmail().equals("")) {
|
if(!currentItem.getEmail().equals("")) {
|
||||||
|
|
||||||
holder.userEmail.setText(currentItem.getEmail());
|
holder.userEmail.setText(currentItem.getEmail());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userEmail.setVisibility(View.GONE);
|
holder.userEmail.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package org.mian.gitnex.adapters;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -80,9 +81,11 @@ public class CollaboratorsAdapter extends BaseAdapter {
|
|||||||
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.collaboratorAvatar);
|
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.collaboratorAvatar);
|
||||||
|
|
||||||
if(!currentItem.getFull_name().equals("")) {
|
if(!currentItem.getFull_name().equals("")) {
|
||||||
viewHolder.collaboratorName.setText(currentItem.getFull_name());
|
|
||||||
|
viewHolder.collaboratorName.setText(Html.fromHtml(currentItem.getFull_name()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
viewHolder.collaboratorName.setText(currentItem.getLogin());
|
viewHolder.collaboratorName.setText(currentItem.getLogin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import android.widget.Filterable;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.gitnex.tea4j.models.Files;
|
import org.gitnex.tea4j.models.Files;
|
||||||
@ -26,7 +27,7 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
private final List<Files> originalFiles = new ArrayList<>();
|
private final List<Files> originalFiles = new ArrayList<>();
|
||||||
private final List<Files> alteredFiles = new ArrayList<>();
|
private final List<Files> alteredFiles = new ArrayList<>();
|
||||||
|
|
||||||
private Context mCtx;
|
private final Context mCtx;
|
||||||
|
|
||||||
private final FilesAdapterListener filesListener;
|
private final FilesAdapterListener filesListener;
|
||||||
|
|
||||||
@ -37,21 +38,18 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
|
|
||||||
class FilesViewHolder extends RecyclerView.ViewHolder {
|
class FilesViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private final ImageView fileTypeImage;
|
private String fileType;
|
||||||
private final ImageView dirTypeImage;
|
|
||||||
private final ImageView unknownTypeImage;
|
private final ImageView fileTypeIs;
|
||||||
private final TextView fileName;
|
private final TextView fileName;
|
||||||
private final TextView fileType;
|
|
||||||
private final TextView fileInfo;
|
private final TextView fileInfo;
|
||||||
|
|
||||||
private FilesViewHolder(View itemView) {
|
private FilesViewHolder(View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
fileName = itemView.findViewById(R.id.fileName);
|
fileName = itemView.findViewById(R.id.fileName);
|
||||||
fileTypeImage = itemView.findViewById(R.id.fileImage);
|
fileTypeIs = itemView.findViewById(R.id.fileTypeIs);
|
||||||
dirTypeImage = itemView.findViewById(R.id.dirImage);
|
|
||||||
unknownTypeImage = itemView.findViewById(R.id.unknownImage);
|
|
||||||
fileType = itemView.findViewById(R.id.fileType);
|
|
||||||
fileInfo = itemView.findViewById(R.id.fileInfo);
|
fileInfo = itemView.findViewById(R.id.fileInfo);
|
||||||
|
|
||||||
//ImageView filesDropdownMenu = itemView.findViewById(R.id.filesDropdownMenu);
|
//ImageView filesDropdownMenu = itemView.findViewById(R.id.filesDropdownMenu);
|
||||||
@ -60,10 +58,10 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
|
|
||||||
Context context = v.getContext();
|
Context context = v.getContext();
|
||||||
|
|
||||||
if(fileType.getText().toString().equals("file")) {
|
if(fileType.equals("file")) {
|
||||||
filesListener.onClickFile(fileName.getText().toString());
|
filesListener.onClickFile(fileName.getText().toString());
|
||||||
}
|
}
|
||||||
else if(fileType.getText().toString().equals("dir")) {
|
else if(fileType.equals("dir")) {
|
||||||
filesListener.onClickDir(fileName.getText().toString());
|
filesListener.onClickDir(fileName.getText().toString());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -171,26 +169,23 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
|||||||
|
|
||||||
Files currentItem = alteredFiles.get(position);
|
Files currentItem = alteredFiles.get(position);
|
||||||
|
|
||||||
holder.fileType.setText(currentItem.getType());
|
holder.fileType = currentItem.getType();
|
||||||
holder.fileName.setText(currentItem.getName());
|
holder.fileName.setText(currentItem.getName());
|
||||||
|
|
||||||
if(currentItem.getType().equals("file")) {
|
if(currentItem.getType().equals("file")) {
|
||||||
holder.fileTypeImage.setVisibility(View.VISIBLE);
|
|
||||||
holder.dirTypeImage.setVisibility(View.GONE);
|
holder.fileTypeIs.setImageDrawable(AppCompatResources.getDrawable(mCtx, R.drawable.ic_file));
|
||||||
holder.unknownTypeImage.setVisibility(View.GONE);
|
|
||||||
holder.fileInfo.setVisibility(View.VISIBLE);
|
holder.fileInfo.setVisibility(View.VISIBLE);
|
||||||
holder.fileInfo.setText(FileUtils.byteCountToDisplaySize(currentItem.getSize()));
|
holder.fileInfo.setText(FileUtils.byteCountToDisplaySize(currentItem.getSize()));
|
||||||
}
|
}
|
||||||
else if(currentItem.getType().equals("dir")) {
|
else if(currentItem.getType().equals("dir")) {
|
||||||
holder.dirTypeImage.setVisibility(View.VISIBLE);
|
|
||||||
holder.unknownTypeImage.setVisibility(View.GONE);
|
holder.fileTypeIs.setImageDrawable(AppCompatResources.getDrawable(mCtx, R.drawable.ic_directory));
|
||||||
holder.fileTypeImage.setVisibility(View.GONE);
|
|
||||||
holder.fileInfo.setVisibility(View.GONE);
|
holder.fileInfo.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.unknownTypeImage.setVisibility(View.VISIBLE);
|
|
||||||
holder.dirTypeImage.setVisibility(View.GONE);
|
holder.fileTypeIs.setImageDrawable(AppCompatResources.getDrawable(mCtx, R.drawable.ic_question));
|
||||||
holder.fileTypeImage.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package org.mian.gitnex.adapters;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -86,9 +87,11 @@ public class MembersByOrgAdapter extends BaseAdapter implements Filterable {
|
|||||||
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(viewHolder.memberAvatar);
|
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(viewHolder.memberAvatar);
|
||||||
|
|
||||||
if(!currentItem.getFullname().equals("")) {
|
if(!currentItem.getFullname().equals("")) {
|
||||||
viewHolder.memberName.setText(currentItem.getFullname());
|
|
||||||
|
viewHolder.memberName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
viewHolder.memberName.setText(currentItem.getLogin());
|
viewHolder.memberName.setText(currentItem.getLogin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -57,10 +58,12 @@ public class ProfileFollowersAdapter extends RecyclerView.Adapter<ProfileFollowe
|
|||||||
UserInfo currentItem = followersList.get(position);
|
UserInfo currentItem = followersList.get(position);
|
||||||
|
|
||||||
if(!currentItem.getFullname().equals("")) {
|
if(!currentItem.getFullname().equals("")) {
|
||||||
holder.userFullName.setText(currentItem.getFullname());
|
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
holder.userName.setVisibility(View.GONE);
|
holder.userName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -57,10 +58,12 @@ public class ProfileFollowingAdapter extends RecyclerView.Adapter<ProfileFollowi
|
|||||||
UserInfo currentItem = followingList.get(position);
|
UserInfo currentItem = followingList.get(position);
|
||||||
|
|
||||||
if(!currentItem.getFullname().equals("")) {
|
if(!currentItem.getFullname().equals("")) {
|
||||||
holder.userFullName.setText(currentItem.getFullname());
|
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
holder.userName.setVisibility(View.GONE);
|
holder.userName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package org.mian.gitnex.adapters;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -102,13 +103,15 @@ public class TeamMembersByOrgAdapter extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getFullname().equals("")) {
|
if(!currentItem.getFullname().equals("")) {
|
||||||
viewHolder.memberName.setText(currentItem.getFullname());
|
|
||||||
viewHolder.memberName.setTypeface(myTypeface);
|
viewHolder.memberName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
viewHolder.memberName.setText(currentItem.getLogin());
|
viewHolder.memberName.setText(currentItem.getLogin());
|
||||||
viewHolder.memberName.setTypeface(myTypeface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewHolder.memberName.setTypeface(myTypeface);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package org.mian.gitnex.adapters;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.text.Html;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -132,14 +133,16 @@ public class UserSearchAdapter extends RecyclerView.Adapter<UserSearchAdapter.Us
|
|||||||
holder.userNameMain.setText(currentItem.getUsername());
|
holder.userNameMain.setText(currentItem.getUsername());
|
||||||
|
|
||||||
if (!currentItem.getFullname().equals("")) {
|
if (!currentItem.getFullname().equals("")) {
|
||||||
holder.userFullName.setText(currentItem.getFullname());
|
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
|
|
||||||
if (!currentItem.getAvatar().equals("")) {
|
if (!currentItem.getAvatar().equals("")) {
|
||||||
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
|
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -103,11 +104,15 @@ public class UserSearchForTeamMemberAdapter extends RecyclerView.Adapter<UserSea
|
|||||||
holder.teamId_.setText(String.valueOf(teamId));
|
holder.teamId_.setText(String.valueOf(teamId));
|
||||||
|
|
||||||
if (!currentItem.getFullname().equals("")) {
|
if (!currentItem.getFullname().equals("")) {
|
||||||
holder.userFullName.setText(currentItem.getFullname());
|
|
||||||
|
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getLogin()));
|
holder.userFullName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getLogin()));
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getLogin()));
|
holder.userName.setText(mCtx.getResources().getString(R.string.usernameWithAt, currentItem.getLogin()));
|
||||||
|
|
||||||
if (!currentItem.getAvatar().equals("")) {
|
if (!currentItem.getAvatar().equals("")) {
|
||||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
@ -75,7 +76,7 @@ public class ProfileFragment extends Fragment {
|
|||||||
userLanguage.setText(R.string.notSupported);
|
userLanguage.setText(R.string.notSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
userFullName.setText(tinyDb.getString("userFullname"));
|
userFullName.setText(Html.fromHtml(tinyDb.getString("userFullname")));
|
||||||
userLogin.setText(getString(R.string.usernameWithAt, tinyDb.getString("userLogin")));
|
userLogin.setText(getString(R.string.usernameWithAt, tinyDb.getString("userLogin")));
|
||||||
|
|
||||||
PicassoService.getInstance(ctx).get()
|
PicassoService.getInstance(ctx).get()
|
||||||
|
@ -1,91 +1,67 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/linearLayoutFilesFrame"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
android:background="?attr/primaryBackgroundColor">
|
android:background="?attr/primaryBackgroundColor"
|
||||||
|
android:gravity="center_vertical"
|
||||||
<TextView
|
android:orientation="horizontal">
|
||||||
android:id="@+id/fileType"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/imageTypes"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fileImage"
|
android:id="@+id/fileTypeIs"
|
||||||
android:layout_width="28dp"
|
android:layout_width="28dp"
|
||||||
android:layout_height="28dp"
|
android:layout_height="28dp"
|
||||||
android:layout_marginEnd="15dp"
|
android:layout_marginEnd="15dp"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
android:visibility="gone"
|
|
||||||
android:src="@drawable/ic_file" />
|
android:src="@drawable/ic_file" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/dirImage"
|
|
||||||
android:layout_width="28dp"
|
|
||||||
android:layout_height="28dp"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:src="@drawable/ic_directory" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/unknownImage"
|
|
||||||
android:layout_width="28dp"
|
|
||||||
android:layout_height="28dp"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:src="@drawable/ic_question" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/infoSection"
|
android:id="@+id/infoSection"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toEndOf="@+id/imageTypes"
|
android:orientation="vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fileName"
|
android:id="@+id/fileName"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight=".80"
|
|
||||||
android:layout_marginBottom="0dp"
|
|
||||||
android:text="@string/defaultFilename"
|
android:text="@string/defaultFilename"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/infoRow"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fileInfo"
|
android:id="@+id/fileInfo"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight=".20"
|
|
||||||
android:layout_marginBottom="0dp"
|
|
||||||
android:text="@string/sizeCopy"
|
android:text="@string/sizeCopy"
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp"
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/filesDropdownMenu"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_weight=".0"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end"
|
|
||||||
android:scaleType="fitEnd"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:src="@drawable/ic_dotted_menu_horizontal"
|
tools:visibility="visible" />
|
||||||
android:contentDescription="@string/menuContentDesc" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
<!--
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/filesDropdownMenu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:contentDescription="@string/menuContentDesc"
|
||||||
|
android:scaleType="fitEnd"
|
||||||
|
android:src="@drawable/ic_dotted_menu_horizontal"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user