New material card profile view

This commit is contained in:
M M Arif 2022-10-09 15:12:31 +05:00
parent c4f621aaa8
commit f482f356c3
9 changed files with 412 additions and 348 deletions

View file

@ -84,8 +84,6 @@ Thanks to all the open source libraries, contributors and donators.
- [google/gson](https://github.com/google/gson)
- [square/okhttp](https://github.com/square/okhttp)
- [square/picasso](https://github.com/square/picasso)
- [wasabeef/picasso-transformations](https://github.com/wasabeef/picasso-transformations)
- [cats-oss/android-gpuimage](https://github.com/cats-oss/android-gpuimage)
- [noties/Markwon](https://github.com/noties/Markwon)
- [ocpsoft/prettytime](https://github.com/ocpsoft/prettytime)
- [ramseth001/TextDrawable](https://github.com/ramseth001/TextDrawable)

View file

@ -73,8 +73,6 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
implementation 'com.google.code.gson:gson:2.9.1'
implementation "com.squareup.picasso:picasso:2.71828"
implementation 'jp.wasabeef:picasso-transformations:2.4.0'
implementation 'jp.co.cyberagent.android:gpuimage:2.1.0'
implementation 'com.github.ramseth001:TextDrawable:1.1.3'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
@ -125,12 +123,10 @@ spotless {
target 'src/**/*.java'
importOrder('android', 'androidx', 'com', 'junit', 'net', 'org', 'java', 'javax', '', '\\#')
removeUnusedImports()
googleJavaFormat().aosp()
indentWithTabs()
formatAnnotations()
}
}

View file

@ -24,7 +24,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.navigation.NavigationView;
import java.util.ArrayList;
import java.util.List;
import jp.wasabeef.picasso.transformations.BlurTransformation;
import org.gitnex.tea4j.v2.models.GeneralAPISettings;
import org.gitnex.tea4j.v2.models.NotificationCount;
import org.gitnex.tea4j.v2.models.ServerVersion;
@ -55,7 +54,6 @@ import org.mian.gitnex.fragments.StarredRepositoriesFragment;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.AppUtil;
import org.mian.gitnex.helpers.ChangeLog;
import org.mian.gitnex.helpers.ColorInverter;
import org.mian.gitnex.helpers.RoundedTransformation;
import org.mian.gitnex.helpers.Toasty;
import org.mian.gitnex.structs.BottomSheetListener;
@ -189,8 +187,6 @@ public class MainActivity extends BaseActivity
TextView userEmail = hView.findViewById(R.id.userEmail);
TextView userFullName = hView.findViewById(R.id.userFullname);
ImageView userAvatar = hView.findViewById(R.id.userAvatar);
ImageView userAvatarBackground =
hView.findViewById(R.id.userAvatarBackground);
MaterialCardView navRecyclerViewFrame =
hView.findViewById(R.id.userAccountsFrame);
@ -245,30 +241,6 @@ public class MainActivity extends BaseActivity
.resize(160, 160)
.centerCrop()
.into(userAvatar);
PicassoService.getInstance(ctx)
.get()
.load(userAvatarNav)
.transform(new BlurTransformation(ctx))
.into(
userAvatarBackground,
new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
int textColor =
new ColorInverter()
.getImageViewContrastColor(
userAvatarBackground);
userFullName.setTextColor(textColor);
userEmail.setTextColor(textColor);
}
@Override
public void onError(Exception e) {}
});
}
}

View file

@ -1,7 +1,6 @@
package org.mian.gitnex.fragments;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Html;
@ -15,24 +14,19 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.widget.ImageViewCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.google.android.material.progressindicator.LinearProgressIndicator;
import com.google.android.material.tabs.TabLayout;
import com.squareup.picasso.Callback;
import java.util.Locale;
import jp.wasabeef.picasso.transformations.BlurTransformation;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.BaseActivity;
import org.mian.gitnex.activities.MainActivity;
import org.mian.gitnex.clients.PicassoService;
import org.mian.gitnex.helpers.AppUtil;
import org.mian.gitnex.helpers.ColorInverter;
import org.mian.gitnex.helpers.RoundedTransformation;
import org.mian.gitnex.helpers.TinyDB;
import org.mian.gitnex.helpers.contexts.AccountContext;
/**
@ -100,15 +94,14 @@ public class MyProfileFragment extends Fragment {
}
public void viewData(View v, AccountContext account) {
TinyDB tinyDb = TinyDB.getInstance(getContext());
TextView userFullName = v.findViewById(R.id.userFullName);
ImageView userAvatarBackground = v.findViewById(R.id.userAvatarBackground);
ImageView userAvatar = v.findViewById(R.id.userAvatar);
TextView userLogin = v.findViewById(R.id.userLogin);
View divider = v.findViewById(R.id.divider);
TextView userLanguage = v.findViewById(R.id.userLanguage);
ImageView userLanguageIcon = v.findViewById(R.id.userLanguageIcon);
TextView userFollowersCount = v.findViewById(R.id.user_followers_count);
TextView userFollowingCount = v.findViewById(R.id.user_following_count);
TextView userStarredReposCount = v.findViewById(R.id.user_starred_repos_count);
String[] userLanguageCodes =
account.getUserInfo().getLanguage() != null
@ -145,33 +138,9 @@ public class MyProfileFragment extends Fragment {
.centerCrop()
.into(userAvatar);
PicassoService.getInstance(ctx)
.get()
.load(account.getUserInfo().getAvatarUrl())
.transform(new BlurTransformation(ctx))
.into(
userAvatarBackground,
new Callback() {
@Override
public void onSuccess() {
int invertedColor =
new ColorInverter()
.getImageViewContrastColor(userAvatarBackground);
userFullName.setTextColor(invertedColor);
divider.setBackgroundColor(invertedColor);
userLogin.setTextColor(invertedColor);
userLanguage.setTextColor(invertedColor);
ImageViewCompat.setImageTintList(
userLanguageIcon, ColorStateList.valueOf(invertedColor));
}
@Override
public void onError(Exception e) {}
});
userFollowersCount.setText(String.valueOf(account.getUserInfo().getFollowersCount()));
userFollowingCount.setText(String.valueOf(account.getUserInfo().getFollowingCount()));
userStarredReposCount.setText(String.valueOf(account.getUserInfo().getStarredReposCount()));
MyProfileFragment.SectionsPagerAdapter mSectionsPagerAdapter =
new SectionsPagerAdapter(getChildFragmentManager());

View file

@ -8,7 +8,6 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import java.util.Locale;
import jp.wasabeef.picasso.transformations.BlurTransformation;
import org.gitnex.tea4j.v2.models.User;
import org.mian.gitnex.R;
import org.mian.gitnex.clients.PicassoService;
@ -17,7 +16,6 @@ import org.mian.gitnex.databinding.FragmentProfileDetailBinding;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.AppUtil;
import org.mian.gitnex.helpers.ClickListener;
import org.mian.gitnex.helpers.ColorInverter;
import org.mian.gitnex.helpers.RoundedTransformation;
import org.mian.gitnex.helpers.TimeHelper;
import org.mian.gitnex.helpers.TinyDB;
@ -102,6 +100,13 @@ public class DetailFragment extends Fragment {
response.body().getLogin()));
binding.userEmail.setText(email);
binding.userFollowersCount.setText(
String.valueOf(response.body().getFollowersCount()));
binding.userFollowingCount.setText(
String.valueOf(response.body().getFollowingCount()));
binding.userStarredReposCount.setText(
String.valueOf(response.body().getStarredReposCount()));
String[] userLanguageCodes =
response.body().getLanguage().split("-");
@ -123,31 +128,6 @@ public class DetailFragment extends Fragment {
.centerCrop()
.into(binding.userAvatar);
PicassoService.getInstance(context)
.get()
.load(response.body().getAvatarUrl())
.transform(new BlurTransformation(context))
.into(
binding.userAvatarBackground,
new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
int invertedColor =
new ColorInverter()
.getImageViewContrastColor(
binding.userAvatarBackground);
binding.userFullName.setTextColor(
invertedColor);
binding.userLogin.setTextColor(
invertedColor);
}
@Override
public void onError(Exception e) {}
});
binding.userJoinedOn.setText(
TimeHelper.formatTime(
response.body().getCreated(), locale));

View file

@ -12,181 +12,262 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="gone"/>
android:visibility="gone" />
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
android:background="?attr/primaryBackgroundColor"
app:elevation="@dimen/dimen0dp">
<FrameLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="@dimen/dimen320dp">
<ImageView
android:id="@+id/userAvatarBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
android:scaleType="centerCrop"/>
android:layout_height="wrap_content"
style="?attr/materialCardViewFilledStyle"
android:layout_marginStart="@dimen/dimen8dp"
android:layout_marginEnd="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen12dp"
app:cardElevation="@dimen/dimen0dp">
<LinearLayout
android:id="@+id/layoutFrameAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_marginTop="@dimen/dimen8dp"
android:padding="@dimen/dimen16dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/dimen60dp"
android:layout_height="@dimen/dimen60dp"
style="?attr/materialCardViewFilledStyle"
android:layout_marginBottom="@dimen/dimen8dp"
app:cardElevation="@dimen/dimen0dp"
app:cardCornerRadius="@dimen/dimen32dp">
<ImageView
android:id="@+id/userAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
android:src="@mipmap/app_logo_round"/>
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/userFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorWhite"
android:textIsSelectable="true"
android:textSize="@dimen/dimen18sp"/>
<TextView
android:id="@+id/userLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen10dp"
android:textColor="@color/colorWhite"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp"/>
<View
android:id="@+id/divider"
android:layout_width="@dimen/dimen50dp"
android:layout_height="@dimen/dimen1dp"
android:layout_marginBottom="@dimen/dimen10dp"
android:background="@color/colorWhite"/>
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen24dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/userLanguageIcon"
android:layout_width="wrap_content"
android:layout_height="@dimen/dimen18dp"
android:layout_marginEnd="@dimen/dimen2dp"
android:contentDescription="@string/generalImgContentText"
android:src="@drawable/ic_language"
app:tint="@color/colorWhite"/>
<com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/dimen80dp"
android:layout_height="@dimen/dimen80dp"
style="?attr/materialCardViewFilledStyle"
android:layout_marginBottom="@dimen/dimen8dp"
app:cardElevation="@dimen/dimen0dp"
app:cardCornerRadius="@dimen/dimen40dp">
<TextView
android:id="@+id/userLanguage"
<ImageView
android:id="@+id/userAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
android:src="@mipmap/app_logo_round" />
</com.google.android.material.card.MaterialCardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dimen24dp"
android:paddingEnd="@dimen/dimen10dp"
android:orientation="vertical">
<TextView
android:id="@+id/userFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="@dimen/dimen18sp" />
<TextView
android:id="@+id/userLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen10dp"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/userLanguageIcon"
android:layout_width="@dimen/dimen16dp"
android:layout_height="@dimen/dimen16dp"
android:layout_marginEnd="@dimen/dimen4dp"
android:contentDescription="@string/generalImgContentText"
android:src="@drawable/ic_language"
app:tint="?attr/iconsColor" />
<TextView
android:id="@+id/userLanguage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen20dp"
android:layout_marginBottom="@dimen/dimen0dp"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/followers_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorWhite"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp"/>
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/profileTabFollowers"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_followers_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/following_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/profileTabFollowing"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_following_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/starred_repos_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/starredRepos"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_starred_repos_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen200dp">
android:background="?attr/primaryBackgroundColor"
android:layout_marginTop="@dimen/dimen200dp"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/fragmentProfileCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CustomMaterCardViewStyle"
app:cardBackgroundColor="?attr/primaryBackgroundColor"
app:strokeWidth="@dimen/dimen0dp"
app:strokeColor="?attr/colorPrimary">
android:layout_margin="@dimen/dimen8dp"
app:strokeWidth="@dimen/dimen2dp"
app:cardCornerRadius="@dimen/dimen10dp"
app:strokeColor="?attr/colorPrimary"
style="?attr/materialCardViewFilledStyle">
<LinearLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextAppearance="@android:style/TextAppearance.Material.Widget.TabWidget"
app:tabIndicatorGravity="stretch"
app:tabMode="fixed"
app:tabIndicatorColor="?attr/colorPrimary"
app:tabIndicatorFullWidth="true"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">
app:tabSelectedTextColor="@android:color/white"
app:tabTextColor="?attr/colorPrimary">
<com.google.android.material.card.MaterialCardView
android:id="@+id/fragmentProfileCard"
android:layout_width="match_parent"
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabFollowers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dimen12dp"
app:strokeWidth="@dimen/dimen2dp"
app:cardCornerRadius="@dimen/dimen32dp"
app:strokeColor="?attr/colorPrimary"
style="?attr/materialCardViewFilledStyle">
android:text="@string/profileTabFollowers" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextAppearance="@android:style/TextAppearance.Material.Widget.TabWidget"
app:tabIndicatorGravity="stretch"
app:tabMode="fixed"
app:tabIndicatorColor="?attr/colorPrimary"
app:tabIndicatorFullWidth="true"
android:background="?attr/primaryBackgroundColor"
app:tabSelectedTextColor="@android:color/white"
app:tabTextColor="?attr/colorPrimary">
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabFollowing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profileTabFollowing" />
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabFollowers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profileTabFollowers"/>
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabEmails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profileTabEmails" />
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabFollowing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profileTabFollowing"/>
<com.google.android.material.tabs.TabItem
android:id="@+id/profileTabEmails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profileTabEmails"/>
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen72dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen48dp"
android:background="?attr/primaryBackgroundColor"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -15,137 +15,205 @@
android:indeterminate="true"
android:visibility="gone"
style="@style/Widget.Material3.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/>
app:indicatorColor="?attr/progressIndicatorColor" />
<FrameLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
style="?attr/materialCardViewFilledStyle"
android:layout_margin="@dimen/dimen8dp"
app:cardElevation="@dimen/dimen0dp">
<RelativeLayout
android:id="@+id/profileFrame"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dimen320dp"
android:gravity="top"
android:layout_height="wrap_content"
android:foreground="?android:attr/selectableItemBackground"
android:background="?attr/materialCardBackgroundColor"
android:padding="@dimen/dimen24dp"
android:orientation="vertical">
<ImageView
android:id="@+id/userAvatarBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
android:scaleType="centerCrop"/>
<LinearLayout
android:id="@+id/layoutFrameAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/dimen16dp"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/dimen60dp"
android:layout_height="@dimen/dimen60dp"
style="?attr/materialCardViewFilledStyle"
android:layout_marginBottom="@dimen/dimen8dp"
android:layout_marginTop="@dimen/dimen16dp"
app:cardElevation="@dimen/dimen0dp"
app:cardCornerRadius="@dimen/dimen32dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/dimen80dp"
android:layout_height="@dimen/dimen80dp"
style="?attr/materialCardViewFilledStyle"
android:layout_marginBottom="@dimen/dimen8dp"
app:cardElevation="@dimen/dimen0dp"
app:cardCornerRadius="@dimen/dimen40dp">
<ImageView
android:id="@+id/userAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/generalImgContentText"
tools:src="@mipmap/app_logo_round"/>
android:src="@mipmap/app_logo_round" />
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/userFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen8dp"
android:textColor="@color/colorWhite"
android:textIsSelectable="true"
android:textSize="@dimen/dimen18sp"/>
<TextView
android:id="@+id/userLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorWhite"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp"/>
</LinearLayout>
</RelativeLayout>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dimen200dp"
style="@style/CustomMaterCardViewStyle"
app:cardBackgroundColor="?attr/primaryBackgroundColor"
app:strokeWidth="@dimen/dimen0dp"
android:elevation="@dimen/dimen0dp"
app:strokeColor="?attr/colorPrimary">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/dimen16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
android:paddingStart="@dimen/dimen24dp"
android:paddingEnd="@dimen/dimen10dp"
android:orientation="vertical">
<ImageView
android:layout_gravity="center"
<TextView
android:id="@+id/userFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/generalImgContentText"
app:srcCompat="@drawable/ic_email"/>
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="@dimen/dimen18sp" />
<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/userLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen16dp"
android:gravity="center_vertical"
android:orientation="vertical">
android:layout_marginBottom="@dimen/dimen10dp"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="@dimen/dimen14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/userEmail"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen16sp"/>
</LinearLayout>
<TextView
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen14sp"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen20dp"
android:layout_marginBottom="@dimen/dimen0dp"
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/followers_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/profileTabFollowers"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_followers_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/following_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/profileTabFollowing"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_following_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/starred_repos_section"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:text="@string/starredRepos"
android:textSize="@dimen/dimen14sp" />
<TextView
android:id="@+id/user_starred_repos_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:paddingTop="@dimen/dimen6dp"
android:textStyle="bold"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen32dp"
android:orientation="horizontal">
<ImageView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/generalImgContentText"
app:srcCompat="@drawable/ic_email" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen32dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
android:layout_marginStart="@dimen/dimen16dp"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/userEmail"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen16sp" />
<TextView
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen32dp"
android:orientation="horizontal">
<ImageView
android:layout_gravity="center"
@ -166,7 +234,7 @@
android:layout_height="wrap_content"
android:text="@string/settingsLanguageSelectorHeader"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen16sp"/>
android:textSize="@dimen/dimen16sp" />
<TextView
android:id="@+id/userLang"
@ -174,7 +242,7 @@
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen14sp"/>
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
@ -183,9 +251,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen32dp"
android:orientation="horizontal"
android:paddingStart="@dimen/dimen16dp"
android:paddingEnd="@dimen/dimen16dp">
android:orientation="horizontal">
<ImageView
android:layout_gravity="center"
@ -197,7 +263,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginStart="@dimen/dimen16dp"
android:gravity="center_vertical"
android:orientation="vertical">
@ -206,7 +272,7 @@
android:layout_height="wrap_content"
android:text="@string/joined"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen16sp"/>
android:textSize="@dimen/dimen16sp" />
<TextView
android:id="@+id/userJoinedOn"
@ -214,15 +280,13 @@
android:layout_height="wrap_content"
android:alpha="0.9"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen14sp"/>
android:textSize="@dimen/dimen14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View file

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/navHeaderFrame"
android:layout_width="match_parent"
android:layout_height="180dp">
android:layout_height="@dimen/dimen180dp">
<ImageView
android:id="@+id/userAvatarBackground"
@ -19,7 +19,7 @@
android:layout_height="match_parent"
android:gravity="bottom"
android:orientation="vertical"
android:padding="20dp">
android:padding="@dimen/dimen20dp">
<LinearLayout
android:layout_width="match_parent"
@ -45,8 +45,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginStart="@dimen/dimen20dp"
android:layout_marginTop="@dimen/dimen10dp"
android:orientation="horizontal">
<com.google.android.material.card.MaterialCardView
@ -69,9 +69,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
</LinearLayout>
@ -79,17 +80,19 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginTop="@dimen/dimen20dp"
android:paddingStart="@dimen/dimen8dp"
android:paddingEnd="@dimen/dimen4dp"
android:orientation="vertical">
<TextView
android:id="@+id/userFullname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorWhite"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="18sp"
tools:text="Test user"/>
android:textSize="@dimen/dimen18sp"
tools:text="Test user" />
<TextView
android:id="@+id/userEmail"
@ -97,10 +100,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:textColor="@color/colorWhite"
android:textColor="?attr/primaryTextColor"
android:textIsSelectable="true"
android:textSize="14sp"
tools:text="example@example.com"/>
android:textSize="@dimen/dimen14sp"
tools:text="example@example.com" />
</LinearLayout>

View file

@ -847,4 +847,5 @@
<string name="commitStatuses">Statuses</string>
<string name="statusNoUrl">This status has no linked target URL.</string>
<string name="starredRepos">Starred Repos</string>
</resources>