mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
Merge remote-tracking branch 'refs/remotes/k0shk0sh/master'
This commit is contained in:
commit
db370e5357
@ -4,6 +4,7 @@ import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.fastaccess.App;
|
||||
import com.fastaccess.helper.PrefGetter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ -12,6 +13,7 @@ import io.requery.Entity;
|
||||
import io.requery.Key;
|
||||
import io.requery.Nullable;
|
||||
import lombok.NoArgsConstructor;
|
||||
import rx.Observable;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 16 Mar 2017, 7:36 PM
|
||||
@ -52,6 +54,13 @@ import lombok.NoArgsConstructor;
|
||||
int contributions;
|
||||
@Nullable boolean isLoggedIn;
|
||||
|
||||
public Observable<Login> update(Login login) {
|
||||
login.setToken(PrefGetter.getToken());
|
||||
login.setIsLoggedIn(true);
|
||||
return App.getInstance().getDataStore().update(login)
|
||||
.toObservable();
|
||||
}
|
||||
|
||||
public void save(Login entity) {
|
||||
// Login login = getUser();
|
||||
// if (login != null) {
|
||||
|
||||
@ -31,7 +31,8 @@ public interface IssueService {
|
||||
|
||||
@GET("repos/{owner}/{repo}/issues")
|
||||
Observable<Pageable<Issue>> getRepositoryIssues(@Path("owner") String owner, @Path("repo") String repo,
|
||||
@Query("state") String state, @Query("page") int page);
|
||||
@Query("state") String state, @Query("sort") String sortBy,
|
||||
@Query("page") int page);
|
||||
|
||||
@GET("search/issues") Observable<Pageable<Issue>> getIssuesWithCount(@NonNull @Query(value = "q", encoded = true) String query,
|
||||
@Query("page") int page);
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package com.fastaccess.ui.adapter;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.helper.AppHelper;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.viewholder.SimpleViewHolder;
|
||||
import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter;
|
||||
import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 11 May 2017, 6:58 PM
|
||||
*/
|
||||
|
||||
public class TopicsAdapter extends BaseRecyclerAdapter<String, SimpleViewHolder<String>, BaseViewHolder.OnItemClickListener<String>> {
|
||||
private boolean isLightTheme = true;
|
||||
@ColorInt private int cardBackground;
|
||||
|
||||
public TopicsAdapter(@NonNull List<String> data) {
|
||||
super(data);
|
||||
}
|
||||
|
||||
@Override protected SimpleViewHolder<String> viewHolder(ViewGroup parent, int viewType) {
|
||||
isLightTheme = !AppHelper.isNightMode(parent.getResources());
|
||||
cardBackground = ViewHelper.getCardBackground(parent.getContext());
|
||||
return new SimpleViewHolder<>(BaseViewHolder.getView(parent, R.layout.topics_row_item), null);
|
||||
}
|
||||
|
||||
@Override protected void onBindView(SimpleViewHolder<String> holder, int position) {
|
||||
if (isLightTheme) {
|
||||
holder.itemView.setBackgroundColor(cardBackground);
|
||||
}
|
||||
holder.bind(getItem(position));
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
@Nullable @BindView(R.id.toolbar) Toolbar toolbar;
|
||||
@Nullable @BindView(R.id.appbar) public AppBarLayout appbar;
|
||||
@Nullable @BindView(R.id.drawer) public DrawerLayout drawer;
|
||||
@Nullable @BindView(R.id.extrasNav) NavigationView extraNav;
|
||||
@Nullable @BindView(R.id.extrasNav) public NavigationView extraNav;
|
||||
|
||||
private long backPressTimer;
|
||||
private Toast toast;
|
||||
|
||||
@ -112,6 +112,10 @@ public class MainActivity extends BaseActivity<MainMvp.View, MainPresenter> impl
|
||||
getPresenter().onModuleChanged(getSupportFragmentManager(), navType);
|
||||
}
|
||||
|
||||
@Override public void onUpdateDrawerMenuHeader() {
|
||||
setupNavigationView(extraNav);
|
||||
}
|
||||
|
||||
@Shortcut(id = "myIssues", icon = R.drawable.ic_issues_shortcut, shortLabelRes = R.string.issues, rank = 2, action = "myIssues")
|
||||
public void myIssues() {}//do nothing
|
||||
|
||||
|
||||
@ -33,6 +33,8 @@ interface MainMvp {
|
||||
interface View extends BaseMvp.FAView {
|
||||
|
||||
void onNavigationChanged(@NavigationType int navType);
|
||||
|
||||
void onUpdateDrawerMenuHeader();
|
||||
}
|
||||
|
||||
interface Presenter extends BaseMvp.FAPresenter,
|
||||
|
||||
@ -8,6 +8,8 @@ import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.feeds.FeedsFragment;
|
||||
import com.fastaccess.ui.modules.main.issues.pager.MyIssuesPagerFragment;
|
||||
@ -22,6 +24,17 @@ import static com.fastaccess.helper.AppHelper.getFragmentByTag;
|
||||
|
||||
class MainPresenter extends BasePresenter<MainMvp.View> implements MainMvp.Presenter {
|
||||
|
||||
|
||||
MainPresenter() {
|
||||
manageSubscription(RxHelper.getObserver(RestProvider.getUserService().getUser())
|
||||
.flatMap(login -> login.update(login))
|
||||
.subscribe(login -> {
|
||||
if (login != null) {
|
||||
sendToView(MainMvp.View::onUpdateDrawerMenuHeader);
|
||||
}
|
||||
}, Throwable::printStackTrace/*fail silently*/));
|
||||
}
|
||||
|
||||
@Override public boolean canBackPress(@NonNull DrawerLayout drawerLayout) {
|
||||
return !drawerLayout.isDrawerOpen(GravityCompat.START);
|
||||
}
|
||||
|
||||
@ -11,11 +11,13 @@ import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.widget.TextViewCompat;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.format.Formatter;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.data.dao.LicenseModel;
|
||||
@ -33,6 +35,7 @@ import com.fastaccess.helper.PrefGetter;
|
||||
import com.fastaccess.helper.TypeFaceHelper;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.provider.tasks.git.GithubActionService;
|
||||
import com.fastaccess.ui.adapter.TopicsAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.filter.issues.FilterIssuesActivity;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
@ -51,6 +54,7 @@ import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnCheckedChanged;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnLongClick;
|
||||
import icepick.State;
|
||||
@ -86,6 +90,8 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
|
||||
@BindView(R.id.pinLayout) View pinLayout;
|
||||
@BindView(R.id.pinText) FontTextView pinText;
|
||||
@BindView(R.id.filterLayout) View filterLayout;
|
||||
@BindView(R.id.topicsList) RecyclerView topicsList;
|
||||
@BindView(R.id.sortByUpdated) CheckBox sortByUpdated;
|
||||
@State @RepoPagerMvp.RepoNavigationType int navType;
|
||||
@State String login;
|
||||
@State String repoId;
|
||||
@ -176,14 +182,6 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
private void hideFilterLayout() {
|
||||
AnimHelper.mimicFabVisibility(false, filterLayout, new FloatingActionButton.OnVisibilityChangedListener() {
|
||||
@Override public void onHidden(FloatingActionButton actionButton) {
|
||||
fab.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@OnClick(R.id.detailsIcon) void onTitleClick() {
|
||||
Repo repoModel = getPresenter().getRepo();
|
||||
if (repoModel != null && !InputHelper.isEmpty(repoModel.getDescription())) {
|
||||
@ -238,6 +236,15 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
|
||||
return false;
|
||||
}
|
||||
|
||||
@OnCheckedChanged(R.id.sortByUpdated) void onSortIssues(boolean isChecked) {
|
||||
RepoIssuesPagerFragment pagerView = (RepoIssuesPagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(),
|
||||
RepoIssuesPagerFragment.TAG);
|
||||
if (pagerView != null) {
|
||||
pagerView.onChangeIssueSort(isChecked);
|
||||
}
|
||||
hideFilterLayout();
|
||||
}
|
||||
|
||||
@Override protected int layout() {
|
||||
return R.layout.repo_pager_activity;
|
||||
}
|
||||
@ -300,12 +307,18 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
|
||||
}
|
||||
|
||||
@Override public void onInitRepo() {
|
||||
hideProgress();
|
||||
if (getPresenter().getRepo() == null) {
|
||||
return;
|
||||
}
|
||||
bottomNavigation.setOnMenuItemClickListener(getPresenter());
|
||||
Repo repoModel = getPresenter().getRepo();
|
||||
hideProgress();
|
||||
if (repoModel.getTopics() != null && !repoModel.getTopics().isEmpty()) {
|
||||
topicsList.setVisibility(View.VISIBLE);
|
||||
topicsList.setAdapter(new TopicsAdapter(repoModel.getTopics()));
|
||||
} else {
|
||||
topicsList.setVisibility(View.GONE);
|
||||
}
|
||||
onRepoPinned(AbstractPinnedRepos.isPinned(repoModel.getFullName()));
|
||||
pinText.setText(R.string.pin);
|
||||
detailsIcon.setVisibility(InputHelper.isEmpty(repoModel.getDescription()) ? View.GONE : View.VISIBLE);
|
||||
@ -584,4 +597,12 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
|
||||
fab.hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void hideFilterLayout() {
|
||||
AnimHelper.mimicFabVisibility(false, filterLayout, new FloatingActionButton.OnVisibilityChangedListener() {
|
||||
@Override public void onHidden(FloatingActionButton actionButton) {
|
||||
fab.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,13 +32,11 @@ import icepick.State;
|
||||
|
||||
public class RepoIssuesPagerFragment extends BaseFragment<RepoIssuesPagerMvp.View, RepoIssuesPagerPresenter> implements RepoIssuesPagerMvp.View {
|
||||
|
||||
|
||||
public static final String TAG = RepoIssuesPagerFragment.class.getSimpleName();
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
@State HashSet<TabsCountStateModel> counts = new HashSet<>();
|
||||
|
||||
|
||||
public static RepoIssuesPagerFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoIssuesPagerFragment view = new RepoIssuesPagerFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
@ -100,6 +98,14 @@ public class RepoIssuesPagerFragment extends BaseFragment<RepoIssuesPagerMvp.Vie
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void onChangeIssueSort(boolean isLastUpdated) {
|
||||
if (pager == null || pager.getAdapter() == null) return;
|
||||
RepoClosedIssuesFragment closedIssues = (RepoClosedIssuesFragment) pager.getAdapter().instantiateItem(pager, 1);
|
||||
if (closedIssues != null) closedIssues.onRefresh(isLastUpdated);
|
||||
RepoOpenedIssuesFragment openedIssues = (RepoOpenedIssuesFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (openedIssues != null) openedIssues.onRefresh(isLastUpdated);
|
||||
}
|
||||
|
||||
private void updateCount(@NonNull TabsCountStateModel model) {
|
||||
TextView tv = ViewHelper.getTabTextView(tabs, model.getTabIndex());
|
||||
tv.setText(SpannableBuilder.builder()
|
||||
|
||||
@ -16,6 +16,8 @@ public interface RepoIssuesPagerMvp {
|
||||
|
||||
void setCurrentItem(int index, boolean refresh);
|
||||
|
||||
void onChangeIssueSort(boolean isLastUpdated);
|
||||
|
||||
@IntRange(from = 0, to = 1) int getCurrentItem();
|
||||
}
|
||||
|
||||
|
||||
@ -168,6 +168,11 @@ public class RepoClosedIssuesFragment extends BaseFragment<RepoIssuesMvp.View, R
|
||||
parser.getNumber()), RepoIssuesMvp.ISSUE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@Override public void onRefresh(boolean isLastUpdated) {
|
||||
getPresenter().onSetSortBy(isLastUpdated);
|
||||
getPresenter().onCallApi(1, IssueState.open);
|
||||
}
|
||||
|
||||
@Override public void onRefresh() {
|
||||
getPresenter().onCallApi(1, IssueState.closed);
|
||||
}
|
||||
|
||||
@ -33,6 +33,8 @@ interface RepoIssuesMvp {
|
||||
void onUpdateCount(int totalCount);
|
||||
|
||||
void onOpenIssue(@NonNull PullsIssuesParser parser);
|
||||
|
||||
void onRefresh(boolean isLastUpdated);
|
||||
}
|
||||
|
||||
interface Presenter extends BaseMvp.FAPresenter,
|
||||
@ -48,5 +50,7 @@ interface RepoIssuesMvp {
|
||||
@NonNull String repoId();
|
||||
|
||||
@NonNull String login();
|
||||
|
||||
void onSetSortBy(boolean isLastUpdated);
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ class RepoIssuesPresenter extends BasePresenter<RepoIssuesMvp.View> implements R
|
||||
private int previousTotal;
|
||||
private int lastPage = Integer.MAX_VALUE;
|
||||
private IssueState issueState;
|
||||
private boolean isLastUpdated;
|
||||
|
||||
@Override public int getCurrentPage() {
|
||||
return page;
|
||||
@ -71,8 +72,12 @@ class RepoIssuesPresenter extends BasePresenter<RepoIssuesMvp.View> implements R
|
||||
sendToView(RepoIssuesMvp.View::hideProgress);
|
||||
return;
|
||||
}
|
||||
String sortBy = "created";
|
||||
if (isLastUpdated) {
|
||||
sortBy = "updated";
|
||||
}
|
||||
setCurrentPage(page);
|
||||
makeRestCall(RestProvider.getIssueService().getRepositoryIssues(login, repoId, parameter.name(), page),
|
||||
makeRestCall(RestProvider.getIssueService().getRepositoryIssues(login, repoId, parameter.name(), sortBy, page),
|
||||
issues -> {
|
||||
lastPage = issues.getLast();
|
||||
List<Issue> filtered = Stream.of(issues.getItems())
|
||||
@ -126,6 +131,10 @@ class RepoIssuesPresenter extends BasePresenter<RepoIssuesMvp.View> implements R
|
||||
return login;
|
||||
}
|
||||
|
||||
@Override public void onSetSortBy(boolean isLastUpdated) {
|
||||
this.isLastUpdated = isLastUpdated;
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Issue item) {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForIssue(item.getHtmlUrl());
|
||||
if (parser != null && getView() != null) {
|
||||
|
||||
@ -180,6 +180,11 @@ public class RepoOpenedIssuesFragment extends BaseFragment<RepoIssuesMvp.View, R
|
||||
parser.getNumber()), RepoIssuesMvp.ISSUE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@Override public void onRefresh(boolean isLastUpdated) {
|
||||
getPresenter().onSetSortBy(isLastUpdated);
|
||||
getPresenter().onCallApi(1, IssueState.open);
|
||||
}
|
||||
|
||||
@Override public void onRefresh() {
|
||||
getPresenter().onCallApi(1, IssueState.open);
|
||||
}
|
||||
|
||||
42
app/src/main/res/layout/filter_issues_popup.xml
Normal file
42
app/src/main/res/layout/filter_issues_popup.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/add"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:drawablePadding="@dimen/spacing_xs_large"
|
||||
android:drawableStart="@drawable/ic_add"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:text="@string/add"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/search"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:drawablePadding="@dimen/spacing_xs_large"
|
||||
android:drawableStart="@drawable/ic_search"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:text="@string/search"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontCheckbox
|
||||
android:id="@+id/sortByUpdated"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:button="@null"
|
||||
android:drawableStart="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:drawablePadding="@dimen/spacing_xs_large"
|
||||
android:text="@string/last_updated"/>
|
||||
</LinearLayout>
|
||||
@ -38,33 +38,7 @@
|
||||
app:cardCornerRadius="@dimen/spacing_normal"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/add"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:drawablePadding="@dimen/spacing_xs_large"
|
||||
android:drawableStart="@drawable/ic_add"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:text="@string/add"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/search"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:drawablePadding="@dimen/spacing_xs_large"
|
||||
android:drawableStart="@drawable/ic_search"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:text="@string/search"/>
|
||||
</LinearLayout>
|
||||
<include layout="@layout/filter_issues_popup"/>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
@ -9,95 +9,112 @@
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/spacing_xs_large"
|
||||
android:paddingEnd="@dimen/spacing_normal"
|
||||
android:paddingTop="@dimen/spacing_xs_large"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/spacing_normal"
|
||||
android:paddingTop="@dimen/spacing_normal"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
tools:ignore="RtlSymmetry"
|
||||
tools:showIn="@layout/repo_pager_activity">
|
||||
|
||||
<com.fastaccess.ui.widgets.AvatarLayout
|
||||
android:id="@+id/avatarLayout"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="@dimen/avatar_margin_end"
|
||||
android:layout_marginStart="@dimen/avatar_margin"/>
|
||||
tools:showIn="@layout/header_title_with_toolbar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginEnd="@dimen/spacing_micro"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<com.fastaccess.ui.widgets.AvatarLayout
|
||||
android:id="@+id/avatarLayout"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="@dimen/avatar_margin_end"
|
||||
android:layout_marginStart="@dimen/avatar_margin"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/headerTitle"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginEnd="@dimen/spacing_normal"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="One must invent the visitor in order to Bliss happens when you follow art so compassionately that whatsoever you are luring is your relativity.praise the sinner of remarkable vision."/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/headerTitle"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center"
|
||||
tools:text="50 minutes ago"/>
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginEnd="@dimen/spacing_normal"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="One must invent the visitor in order to Bliss happens when you follow art so compassionately that whatsoever you are luring is your relativity.praise the sinner of remarkable vision."/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/size"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/spacing_normal"
|
||||
tools:text="50 minutes ago"/>
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/language"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/spacing_normal"
|
||||
android:visibility="gone"
|
||||
tools:text="Java"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/date"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center"
|
||||
tools:text="50 minutes ago"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/size"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/spacing_normal"
|
||||
tools:text="50 minutes ago"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/language"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/spacing_normal"
|
||||
android:visibility="gone"
|
||||
tools:text="Java"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/detailsIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/description"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_info_outline"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/detailsIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/description"
|
||||
android:padding="@dimen/spacing_normal"
|
||||
android:src="@drawable/ic_info_outline"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView
|
||||
android:id="@+id/topicsList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/avatar_margin_end"
|
||||
android:layout_marginStart="@dimen/avatar_margin"
|
||||
android:layout_marginTop="@dimen/spacing_normal"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="@string/linear_layout_manager"/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/Base.TextAppearance.AppCompat.Small"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_micro"
|
||||
android:background="?colorPrimaryDark"
|
||||
android:maxLines="1"
|
||||
android:padding="@dimen/spacing_normal"
|
||||
android:textColor="?colorAccent"
|
||||
tools:text="github-client"/>
|
||||
Loading…
x
Reference in New Issue
Block a user