Layout changes
This commit is contained in:
parent
1cd76098a0
commit
43b3370c31
|
@ -72,13 +72,13 @@ task gitPushReleaseNotes(type: Exec, dependsOn: 'copyAllReleaseNotes') {
|
|||
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0-alpha03'
|
||||
implementation 'com.google.android.material:material:1.2.0-alpha05'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
|
||||
implementation 'androidx.browser:browser:1.2.0'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
|
||||
implementation "com.github.bumptech.glide:glide:4.11.0"
|
||||
implementation ("com.github.bumptech.glide:recyclerview-integration:4.11.0") {
|
||||
// Excludes the support library because it's already included by Glide.
|
||||
|
@ -129,6 +129,6 @@ dependencies {
|
|||
implementation 'com.github.penfeizhou.android.animation:gif:1.1.0'
|
||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
||||
implementation 'com.github.smarteist:autoimageslider:1.3.2'
|
||||
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0'
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
|
||||
implementation 'com.jaredrummler:cyanea:1.0.2'
|
||||
}
|
||||
|
|
|
@ -1568,27 +1568,30 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
holder.fetch_more.setOnLongClickListener(v -> {
|
||||
status.setFetchMore(false);
|
||||
holder.fetch_more.setEnabled(false);
|
||||
holder.fetch_more.setVisibility(View.GONE);
|
||||
if (context instanceof BaseMainActivity) {
|
||||
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
List<ManageTimelines> timelines = new TimelinesDAO(context, db).getDisplayedTimelines();
|
||||
for (ManageTimelines tl : timelines) {
|
||||
if (tl.getType() == ManageTimelines.Type.HOME && mPageReferenceMap != null) {
|
||||
DisplayStatusFragment homeFragment = (DisplayStatusFragment) mPageReferenceMap.get(tl.getPosition());
|
||||
if (homeFragment != null) {
|
||||
fetch_all_more = true;
|
||||
homeFragment.fetchMore(status.getId());
|
||||
holder.fetch_more.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
status.setFetchMore(false);
|
||||
holder.fetch_more.setEnabled(false);
|
||||
holder.fetch_more.setVisibility(View.GONE);
|
||||
if (context instanceof BaseMainActivity) {
|
||||
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
List<ManageTimelines> timelines = new TimelinesDAO(context, db).getDisplayedTimelines();
|
||||
for (ManageTimelines tl : timelines) {
|
||||
if (tl.getType() == ManageTimelines.Type.HOME && mPageReferenceMap != null) {
|
||||
DisplayStatusFragment homeFragment = (DisplayStatusFragment) mPageReferenceMap.get(tl.getPosition());
|
||||
if (homeFragment != null) {
|
||||
fetch_all_more = true;
|
||||
homeFragment.fetchMore(status.getId());
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
holder.fetch_more.setVisibility(View.GONE);
|
||||
|
@ -1684,12 +1687,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
}
|
||||
int statusColor = prefs.getInt("theme_statuses_color", -1);
|
||||
if (holder.main_card_container != null && statusColor != -1) {
|
||||
holder.main_card_container.setCardBackgroundColor(statusColor);
|
||||
holder.main_card_container.setBackgroundColor(statusColor);
|
||||
if (holder.translation_label != null) {
|
||||
holder.translation_label.setBackgroundColor(statusColor);
|
||||
}
|
||||
} else if (holder.main_card_container != null) {
|
||||
holder.main_card_container.setCardBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||
holder.main_card_container.setBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||
if (holder.translation_label != null) {
|
||||
holder.translation_label.setBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||
}
|
||||
|
@ -3970,7 +3973,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
Button quick_reply_button;
|
||||
ImageView quick_reply_privacy;
|
||||
View status_reply_indicator_top, reply_indicator_dot, status_reply_indicator_bottom, status_reply_indicator_diag_top, status_reply_indicator_diag_bottom;
|
||||
CardView main_card_container;
|
||||
RelativeLayout main_card_container;
|
||||
LinearLayout main_linear_container;
|
||||
View translation_border_view;
|
||||
TextView translation_label;
|
||||
|
|
|
@ -238,6 +238,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
statusDrawerParams.setTagTimeline(tagTimelines.get(0));
|
||||
statusDrawerParams.setTargetedId(targetedId);
|
||||
statusDrawerParams.setOnWifi(isOnWifi);
|
||||
statusDrawerParams.setType(type);
|
||||
statusDrawerParams.setStatuses(this.statuses);
|
||||
|
||||
statusListAdapter = new StatusListAdapter(statusDrawerParams);
|
||||
|
@ -251,6 +252,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
statusDrawerParams.setTargetedId(targetedId);
|
||||
statusDrawerParams.setOnWifi(isOnWifi);
|
||||
statusDrawerParams.setStatuses(this.statuses);
|
||||
statusDrawerParams.setType(type);
|
||||
statusListAdapter = new StatusListAdapter(statusDrawerParams);
|
||||
lv_status.setAdapter(statusListAdapter);
|
||||
}
|
||||
|
@ -276,6 +278,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
lv_status.setAdapter(artListAdapter);
|
||||
}
|
||||
mLayoutManager = new LinearLayoutManager(context);
|
||||
|
||||
lv_status.setLayoutManager(mLayoutManager);
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
app:layout_constraintTop_toTopOf="@id/reply_indicator_dot" />
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_card_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -260,7 +260,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:contentDescription="@string/delete"
|
||||
android:src="@drawable/ic_clear_toot"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/fedilab_features"
|
||||
app:layout_constraintStart_toStartOf="@id/fedilab_features"
|
||||
|
@ -290,7 +290,7 @@
|
|||
android:layout_marginEnd="5dp"
|
||||
android:contentDescription="@string/cached_status"
|
||||
android:src="@drawable/ic_cached_black"
|
||||
android:tint="?attr/textColor"
|
||||
app:tint="?attr/textColor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_account_displayname_owner"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -392,7 +392,7 @@
|
|||
android:paddingBottom="2dp"
|
||||
android:text="@string/display_toot_truncate"
|
||||
android:textAllCaps="false"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
|
@ -704,7 +704,7 @@
|
|||
android:contentDescription="@string/show_media"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_remove_red_eye_img"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -746,7 +746,7 @@
|
|||
android:contentDescription="@string/hide_media"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_remove_red_eye_img"
|
||||
android:tint="?attr/iconColor" />
|
||||
app:tint="?attr/iconColor" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -936,7 +936,7 @@
|
|||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/reply"
|
||||
android:src="@drawable/ic_reply"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -999,7 +999,7 @@
|
|||
android:layout_marginStart="15dp"
|
||||
android:contentDescription="@string/pin_add"
|
||||
android:src="@drawable/ic_pin_drop"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favorite_count"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -1009,7 +1009,7 @@
|
|||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -1020,7 +1020,7 @@
|
|||
android:layout_height="25dp"
|
||||
android:contentDescription="@string/display_toot_truncate"
|
||||
android:src="@drawable/ic_more_horiz"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -1058,6 +1058,6 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
app:layout_constraintStart_toStartOf="@id/reply_indicator_dot"
|
||||
app:layout_constraintTop_toTopOf="@id/reply_indicator_dot" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_card_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -247,7 +247,7 @@
|
|||
android:layout_marginEnd="5dp"
|
||||
android:contentDescription="@string/cached_status"
|
||||
android:src="@drawable/ic_cached_black"
|
||||
android:tint="?attr/textColor"
|
||||
app:tint="?attr/textColor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_account_displayname_owner"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -626,7 +626,7 @@
|
|||
android:contentDescription="@string/hide_media"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_remove_red_eye_img"
|
||||
android:tint="?attr/iconColor" />
|
||||
app:tint="?attr/iconColor" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -667,7 +667,7 @@
|
|||
android:contentDescription="@string/hide_media"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_remove_red_eye_img"
|
||||
android:tint="?attr/iconColor" />
|
||||
app:tint="?attr/iconColor" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -855,7 +855,7 @@
|
|||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/ic_share_peertube"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -873,7 +873,7 @@
|
|||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/ic_reply"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -954,7 +954,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:contentDescription="@string/delete"
|
||||
android:src="@drawable/ic_clear_toot"
|
||||
android:tint="?attr/iconColorMenu"
|
||||
app:tint="?attr/iconColorMenu"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/new_element"
|
||||
|
@ -967,7 +967,7 @@
|
|||
android:layout_marginStart="15dp"
|
||||
android:contentDescription="@string/pin_add"
|
||||
android:src="@drawable/ic_pin_drop"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/status_remove"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -987,7 +987,7 @@
|
|||
android:layout_height="25dp"
|
||||
android:contentDescription="@string/display_toot_truncate"
|
||||
android:src="@drawable/ic_more_horiz"
|
||||
android:tint="?attr/iconColor"
|
||||
app:tint="?attr/iconColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -1031,6 +1031,6 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue