Browse Source

Merge pull request 'Add placeholders for images' (#331) from improve-images-loading into master

Reviewed-on: #331
Reviewed-by: 6543 <6543@noreply.gitea.io>
tags/2.5.0-rc4
M M Arif 1 month ago
parent
commit
11b8bb8d83
25 changed files with 48 additions and 30 deletions
  1. +2
    -2
      app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java
  2. +2
    -2
      app/src/main/java/org/mian/gitnex/activities/MainActivity.java
  3. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/AdminGetUsersAdapter.java
  4. +2
    -2
      app/src/main/java/org/mian/gitnex/adapters/ClosedIssuesAdapter.java
  5. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/CollaboratorsAdapter.java
  6. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/ExploreRepositoriesAdapter.java
  7. +2
    -3
      app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java
  8. +2
    -2
      app/src/main/java/org/mian/gitnex/adapters/IssuesAdapter.java
  9. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/MembersByOrgAdapter.java
  10. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/MyReposListAdapter.java
  11. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/OrganizationsListAdapter.java
  12. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/ProfileFollowersAdapter.java
  13. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/ProfileFollowingAdapter.java
  14. +2
    -2
      app/src/main/java/org/mian/gitnex/adapters/PullRequestsAdapter.java
  15. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/RepoStargazersAdapter.java
  16. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/RepoWatchersAdapter.java
  17. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/ReposListAdapter.java
  18. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/RepositoriesByOrgAdapter.java
  19. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/StarredReposListAdapter.java
  20. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/TeamMembersByOrgAdapter.java
  21. +1
    -1
      app/src/main/java/org/mian/gitnex/adapters/UserSearchAdapter.java
  22. +1
    -1
      app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java
  23. +1
    -1
      app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java
  24. +7
    -0
      app/src/main/res/drawable/ic_loader.xml
  25. +12
    -0
      app/src/main/res/drawable/loader_animated.xml

+ 2
- 2
app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java View File

@@ -388,7 +388,7 @@ public class IssueDetailActivity extends BaseActivity {
tinyDb.putString("issueState", singleIssue.getState());
tinyDb.putString("issueTitle", singleIssue.getTitle());

Picasso.get().load(singleIssue.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
Picasso.get().load(singleIssue.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
String issueNumber_ = "<font color='" + getApplicationContext().getResources().getColor(R.color.lightGray) + "'>" + getApplicationContext().getResources().getString(R.string.hash) + singleIssue.getNumber() + "</font>";
issueTitle.setText(Html.fromHtml(issueNumber_ + " " + singleIssue.getTitle()));
String cleanIssueDescription = singleIssue.getBody().trim();
@@ -406,7 +406,7 @@ public class IssueDetailActivity extends BaseActivity {

ImageView assigneesView = new ImageView(getApplicationContext());

Picasso.get().load(singleIssue.getAssignees().get(i).getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(100, 100).centerCrop().into(assigneesView);
Picasso.get().load(singleIssue.getAssignees().get(i).getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(100, 100).centerCrop().into(assigneesView);

assigneesLayout.addView(assigneesView);
assigneesView.setLayoutParams(params1);


+ 2
- 2
app/src/main/java/org/mian/gitnex/activities/MainActivity.java View File

@@ -207,7 +207,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig

userAvatar = hView.findViewById(R.id.userAvatar);
if (!userAvatarNav.equals("")) {
Picasso.get().load(userAvatarNav).networkPolicy(NetworkPolicy.OFFLINE).transform(new RoundedTransformation(8, 0)).resize(160, 160).centerCrop().into(userAvatar);
Picasso.get().load(userAvatarNav).networkPolicy(NetworkPolicy.OFFLINE).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(160, 160).centerCrop().into(userAvatar);
}

userAvatar.setOnClickListener(new View.OnClickListener() {
@@ -488,7 +488,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig

userAvatar = hView.findViewById(R.id.userAvatar);
if (!Objects.requireNonNull(userDetails).getAvatar().equals("")) {
Picasso.get().load(userDetails.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(160, 160).centerCrop().into(userAvatar);
Picasso.get().load(userDetails.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(160, 160).centerCrop().into(userAvatar);
} else {
userAvatar.setImageResource(R.mipmap.app_logo_round);
}


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/AdminGetUsersAdapter.java View File

@@ -98,7 +98,7 @@ public class AdminGetUsersAdapter extends RecyclerView.Adapter<AdminGetUsersAdap
holder.userRole.setVisibility(View.GONE);
}

Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
}

@Override


+ 2
- 2
app/src/main/java/org/mian/gitnex/adapters/ClosedIssuesAdapter.java View File

@@ -182,9 +182,9 @@ public class ClosedIssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
}

if (issuesModel.getUser().getAvatar_url() != null) {
Picasso.get().load(issuesModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
Picasso.get().load(issuesModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
} else {
Picasso.get().load(issuesModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
Picasso.get().load(issuesModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
}

String issueNumber_ = "<font color='" + context.getResources().getColor(R.color.lightGray) + "'>" + context.getResources().getString(R.string.hash) + issuesModel.getNumber() + "</font>";


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/CollaboratorsAdapter.java View File

@@ -77,7 +77,7 @@ public class CollaboratorsAdapter extends BaseAdapter {
private void initData(ViewHolder viewHolder, int position) {

Collaborators currentItem = collaboratorsList.get(position);
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.collaboratorAvatar);
Picasso.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("")) {
viewHolder.collaboratorName.setText(currentItem.getFull_name());


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/ExploreRepositoriesAdapter.java View File

@@ -182,7 +182,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo

if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
} else {
holder.image.setImageDrawable(drawable);
}


+ 2
- 3
app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java View File

@@ -33,7 +33,6 @@ import java.util.Locale;
import java.util.Objects;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.appcompat.widget.PopupMenu;
import androidx.recyclerview.widget.RecyclerView;
import io.noties.markwon.AbstractMarkwonPlugin;
@@ -179,9 +178,9 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
}

if (currentItem.getUser().getAvatar_url() != null) {
Picasso.get().load(currentItem.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.issueCommenterAvatar);
Picasso.get().load(currentItem.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.issueCommenterAvatar);
} else {
Picasso.get().load(currentItem.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.issueCommenterAvatar);
Picasso.get().load(currentItem.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.issueCommenterAvatar);
}

String cleanIssueComments = currentItem.getBody().trim();


+ 2
- 2
app/src/main/java/org/mian/gitnex/adapters/IssuesAdapter.java View File

@@ -182,9 +182,9 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
}

if (issuesModel.getUser().getAvatar_url() != null) {
Picasso.get().load(issuesModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
Picasso.get().load(issuesModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
} else {
Picasso.get().load(issuesModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
Picasso.get().load(issuesModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(issueAssigneeAvatar);
}

String issueNumber_ = "<font color='" + context.getResources().getColor(R.color.lightGray) + "'>" + context.getResources().getString(R.string.hash) + issuesModel.getNumber() + "</font>";


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/MembersByOrgAdapter.java View File

@@ -83,7 +83,7 @@ public class MembersByOrgAdapter extends BaseAdapter implements Filterable {
private void initData(MembersByOrgAdapter.ViewHolder viewHolder, int position) {

UserInfo currentItem = membersList.get(position);
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(viewHolder.memberAvatar);
Picasso.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("")) {
viewHolder.memberName.setText(currentItem.getFullname());


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/MyReposListAdapter.java View File

@@ -183,7 +183,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.

if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.imageMy);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.imageMy);
} else {
holder.imageMy.setImageDrawable(drawable);
}


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/OrganizationsListAdapter.java View File

@@ -86,7 +86,7 @@ public class OrganizationsListAdapter extends RecyclerView.Adapter<Organizations
holder.mTextView2.setVisibility(View.GONE);
holder.organizationId.setText(Integer.toString(currentItem.getId()));

Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
holder.mTextView1.setText(currentItem.getUsername());
if (!currentItem.getDescription().equals("")) {
holder.mTextView2.setVisibility(View.VISIBLE);


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/ProfileFollowersAdapter.java View File

@@ -65,7 +65,7 @@ public class ProfileFollowersAdapter extends RecyclerView.Adapter<ProfileFollowe
holder.userName.setVisibility(View.GONE);
}

Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
}

@Override


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/ProfileFollowingAdapter.java View File

@@ -65,7 +65,7 @@ public class ProfileFollowingAdapter extends RecyclerView.Adapter<ProfileFollowi
holder.userName.setVisibility(View.GONE);
}

Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
}

@Override


+ 2
- 2
app/src/main/java/org/mian/gitnex/adapters/PullRequestsAdapter.java View File

@@ -170,9 +170,9 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
}

if (prModel.getUser().getAvatar_url() != null) {
Picasso.get().load(prModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
Picasso.get().load(prModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
} else {
Picasso.get().load(prModel.getUser().getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
Picasso.get().load(prModel.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
}

String prNumber_ = "<font color='" + context.getResources().getColor(R.color.lightGray) + "'>" + context.getResources().getString(R.string.hash) + prModel.getNumber() + "</font>";


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/RepoStargazersAdapter.java View File

@@ -79,7 +79,7 @@ public class RepoStargazersAdapter extends BaseAdapter {
private void initData(RepoStargazersAdapter.ViewHolder viewHolder, int position) {

UserInfo currentItem = stargazersList.get(position);
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);

final TinyDB tinyDb = new TinyDB(mCtx);
Typeface myTypeface;


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/RepoWatchersAdapter.java View File

@@ -79,7 +79,7 @@ public class RepoWatchersAdapter extends BaseAdapter {
private void initData(RepoWatchersAdapter.ViewHolder viewHolder, int position) {

UserInfo currentItem = watchersList.get(position);
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);

final TinyDB tinyDb = new TinyDB(mCtx);
Typeface myTypeface;


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/ReposListAdapter.java View File

@@ -187,7 +187,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo

if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
} else {
holder.image.setImageDrawable(drawable);
}


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/RepositoriesByOrgAdapter.java View File

@@ -184,7 +184,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB

if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
} else {
holder.image.setImageDrawable(drawable);
}


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/StarredReposListAdapter.java View File

@@ -185,7 +185,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi

if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
Picasso.get().load(currentItem.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
Picasso.get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.image);
} else {
holder.image.setImageDrawable(drawable);
}


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/TeamMembersByOrgAdapter.java View File

@@ -80,7 +80,7 @@ public class TeamMembersByOrgAdapter extends BaseAdapter {
private void initData(TeamMembersByOrgAdapter.ViewHolder viewHolder, int position) {

UserInfo currentItem = teamMembersList.get(position);
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(viewHolder.memberAvatar);

final TinyDB tinyDb = new TinyDB(mCtx);
Typeface myTypeface;


+ 1
- 1
app/src/main/java/org/mian/gitnex/adapters/UserSearchAdapter.java View File

@@ -141,7 +141,7 @@ public class UserSearchAdapter extends RecyclerView.Adapter<UserSearchAdapter.Us
}

if (!currentItem.getAvatar().equals("")) {
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
Picasso.get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
}

if(getItemCount() > 0) {


+ 1
- 1
app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java View File

@@ -104,7 +104,7 @@ public class OrganizationInfoFragment extends Fragment {
if (response.code() == 200) {

assert orgInfo != null;
Picasso.get().load(orgInfo.getAvatar_url()).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(orgAvatar);
Picasso.get().load(orgInfo.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(orgAvatar);
orgDescInfo.setText(orgInfo.getDescription());
orgWebsiteInfo.setText(orgInfo.getWebsite());
orgLocationInfo.setText(orgInfo.getLocation());


+ 1
- 1
app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java View File

@@ -48,7 +48,7 @@ public class ProfileFragment extends Fragment {
TextView userEmail = v.findViewById(R.id.userEmail);

userFullName.setText(tinyDb.getString("userFullname"));
Picasso.get().load(tinyDb.getString("userAvatar")).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(userAvatar);
Picasso.get().load(tinyDb.getString("userAvatar")).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(userAvatar);
userLogin.setText(getString(R.string.usernameWithAt, tinyDb.getString("userLogin")));
userEmail.setText(tinyDb.getString("userEmail"));



+ 7
- 0
app/src/main/res/drawable/ic_loader.xml View File

@@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="40dp"
android:viewportHeight="40" android:viewportWidth="40"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="0.2" android:fillColor="@color/colorAccent"
android:pathData="M20.201,5.169c-8.254,0 -14.946,6.692 -14.946,14.946c0,8.255 6.692,14.946 14.946,14.946s14.946,-6.691 14.946,-14.946C35.146,11.861 28.455,5.169 20.201,5.169zM20.201,31.749c-6.425,0 -11.634,-5.208 -11.634,-11.634c0,-6.425 5.209,-11.634 11.634,-11.634c6.425,0 11.633,5.209 11.633,11.634C31.834,26.541 26.626,31.749 20.201,31.749z" android:strokeAlpha="0.2"/>
<path android:fillColor="@color/darkGreen" android:pathData="M26.013,10.047l1.654,-2.866c-2.198,-1.272 -4.743,-2.012 -7.466,-2.012h0v3.312h0C22.32,8.481 24.301,9.057 26.013,10.047z"/>
</vector>

+ 12
- 0
app/src/main/res/drawable/loader_animated.xml View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">

<item android:gravity="center">
<animated-rotate
android:drawable="@drawable/ic_loader"
android:pivotX="50%"
android:pivotY="50%" />
</item>

</layer-list>

Loading…
Cancel
Save