minor changes to DisplayLogFragment
This commit is contained in:
@@ -24,6 +24,8 @@ import java.util.List;
|
||||
public class NestedLogAdapter extends RecyclerView.Adapter<NestedLogAdapter.LogEntryViewHolder> {
|
||||
private static final int ENTRY_TYPE_REGULAR = 0;
|
||||
private static final int ENTRY_TYPE_SUBLOG = 1;
|
||||
private static final int LOG_ENTRY_ITEM_INDENT = 2;
|
||||
|
||||
|
||||
private final int mIndentFactor;
|
||||
private LogActionListener mListener;
|
||||
@@ -57,7 +59,7 @@ public class NestedLogAdapter extends RecyclerView.Adapter<NestedLogAdapter.LogE
|
||||
int lastSection = 0;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
OperationResult.LogEntryParcel parcel = list.get(i);
|
||||
if(parcel.mIndent < 1) {
|
||||
if(parcel.mIndent < LOG_ENTRY_ITEM_INDENT) {
|
||||
lastSection = i;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
@@ -135,6 +137,10 @@ public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
RecyclerView listView = new RecyclerView(context);
|
||||
listView.setId(INTERNAL_LIST_VIEW_ID);
|
||||
|
||||
int padding = FormattingUtils.dpToPx(context, 8);
|
||||
listView.setPadding(padding, 0, padding, 0);
|
||||
listView.setClipToPadding(false);
|
||||
|
||||
listContainer.addView(listView, new FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
|
||||
@@ -7,20 +7,11 @@
|
||||
android:id="@+id/toolbar_include"
|
||||
layout="@layout/toolbar_standalone" />
|
||||
|
||||
<LinearLayout
|
||||
<fragment
|
||||
android:id="@+id/list"
|
||||
android:layout_below="@id/toolbar_include"
|
||||
android:orientation="vertical"
|
||||
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/list"
|
||||
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.9" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user