fix merge issues and tweak the header layouts a bit more
This commit is contained in:
parent
85ed0d46ab
commit
568ef56247
@ -396,6 +396,16 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
||||
return app;
|
||||
}
|
||||
|
||||
/**
|
||||
* In order to format all in coming descriptions before they are written
|
||||
* out to the database and used elsewhere, this is needed to intercept
|
||||
* the setting of {@link App#description} to insert the format method.
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private void setDescription(String description) { // NOPMD
|
||||
this.description = formatDescription(description);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the {@code localized} block in the incoming index metadata,
|
||||
* choosing the best match in terms of locale/language while filling as
|
||||
|
@ -504,8 +504,8 @@ public class AppDetailsRecyclerViewAdapter
|
||||
sbWhatsNew.append(whatsNewView.getContext().getString(R.string.details_new_in_version,
|
||||
suggestedApk.versionName).toUpperCase(locale));
|
||||
sbWhatsNew.append("\n\n");
|
||||
sbWhatsNew.append(app.whatsNew);
|
||||
whatsNewView.setText(trimTrailingNewlines(sbWhatsNew));
|
||||
sbWhatsNew.append(trimTrailingNewlines(Html.fromHtml(app.whatsNew)));
|
||||
whatsNewView.setText(sbWhatsNew);
|
||||
whatsNewView.setVisibility(View.VISIBLE);
|
||||
|
||||
// Set focus on the header section to prevent auto scrolling to
|
||||
@ -1091,7 +1091,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
Repo repo = RepoProvider.Helper.findById(context, apk.repoId);
|
||||
if (repo != null) {
|
||||
repository.setVisibility(View.VISIBLE);
|
||||
repository.setText(String.format(repo.getName(), context.getString(R.string.app_repository)));
|
||||
repository.setText(String.format(context.getString(R.string.app_repository), repo.getName()));
|
||||
} else {
|
||||
repository.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
@ -138,7 +138,6 @@ public class UpdatesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||
public void toggleAllUpdateableApps() {
|
||||
showAllUpdateableApps = !showAllUpdateableApps;
|
||||
populateItems();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,6 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import com.hannesdorfmann.adapterdelegates3.AdapterDelegate;
|
||||
import org.fdroid.fdroid.R;
|
||||
|
17
app/src/main/res/layout/app_details2_header.xml
Executable file → Normal file
17
app/src/main/res/layout/app_details2_header.xml
Executable file → Normal file
@ -184,11 +184,11 @@
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scrollbars="none"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textIsSelectable="true"
|
||||
@ -215,11 +215,11 @@
|
||||
android:id="@+id/label_anti_features"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scrollbars="none"
|
||||
android:text="@string/antifeatures"
|
||||
android:textStyle="bold"
|
||||
@ -230,23 +230,24 @@
|
||||
android:id="@+id/text_anti_features"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scrollbars="none"
|
||||
tools:text="\t• This app tracks and reports your activity."
|
||||
tools:text="This app tracks and reports your activity."
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/description_more"
|
||||
style="@style/DetailsMoreButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/more"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
style="@style/DetailsMoreButtonStyle" />
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Defines the layout of a single permission item.
|
||||
-->
|
||||
|
||||
<view class="org.fdroid.fdroid.privileged.views.AppSecurityPermissions$PermissionItemView"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/perm_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/perm_name"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|start" />
|
||||
|
||||
</view>
|
@ -24,7 +24,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/text_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -35,8 +35,7 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/action_button"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/progress_bar"
|
||||
android:orientation="vertical">
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name"
|
||||
@ -46,7 +45,9 @@
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/installedApps"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
@ -55,26 +56,27 @@
|
||||
tools:text="@string/app_list_download_ready"
|
||||
style="@style/AppListItemStatusText"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_name" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cancel_button"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:src="@drawable/ic_cancel"
|
||||
android:contentDescription="@string/cancel"
|
||||
android:background="@android:color/transparent"
|
||||
@ -84,6 +86,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progress_bar"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/action_button"
|
||||
style="@style/DetailsPrimaryButtonStyleSmall"
|
||||
|
Loading…
x
Reference in New Issue
Block a user