Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge 151e24b into c1b972b
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed Aug 30, 2017
2 parents c1b972b + 151e24b commit 5154ad2
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 90 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ tasks.withType(Test) {
systemProperty "robolectric.logging", "stdout"
}
ext {
supportLibVersion = '25.1.0'
supportLibVersion = '25.3.1'
}
//noinspection GroovyAssignabilityCheck
configurations.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
if (flagMessage.getText().toString().isEmpty()) {
Toast.makeText(getContext(), getContext().getResources().getString(R.string.no_message), Toast.LENGTH_LONG).show();
} else {
openInChrome(REDDIT_MSG_URL_HEADER + "*****" + toolbar.getSubtitle() +" REPORT" + "*****" + "%0A" +(flagMessage.getText().toString().trim()));
openInChrome(REDDIT_MSG_URL_HEADER + "*****" + primaryTitle.getText() +" REPORT" + "*****" + "%0A" +(flagMessage.getText().toString().trim()));
}
}
})
Expand All @@ -138,7 +138,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_48px);
toolbar.setNavigationIcon(R.drawable.ic_close_white_24dp);
toolbar.setNavigationOnClickListener(this);
toolbar.inflateMenu(R.menu.appdetails_fragment);
toolbar.setOnMenuItemClickListener(this);
Expand Down Expand Up @@ -245,7 +245,6 @@ public void displayDetails(@Nullable AppInfo appInfo) {
tagContainer.addView(tv);
}
tagContainer.setVisibility(appInfo.getTags().isEmpty() ? View.GONE : View.VISIBLE);
toolbar.setSubtitle(appInfo.getAppName());
createMenus();

}
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_close_white_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFF"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
177 changes: 91 additions & 86 deletions app/src/main/res/layout/fragment_appdetails_layout.xml
Original file line number Diff line number Diff line change
@@ -1,89 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
android:id="@+id/details_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/AppTheme.Dark"
app:title="@string/screen_details"/>

<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

</android.support.v4.widget.NestedScrollView>
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">

<FrameLayout
android:id="@+id/icon_frame"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="top"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:visibility="gone">

<ImageView
android:id="@+id/icon_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="App icon"
android:visibility="invisible"/>

<ProgressBar
android:id="@+id/icon_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:visibility="visible"/>
</FrameLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/title_primary"
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Lorem ipsum"/>

<TextView
android:id="@+id/title_secondary"
style="@style/TextAppearance.AppCompat.Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Lorem ipsum"/>
</LinearLayout>
</LinearLayout>

<android.support.v4.view.ViewPager
android:paddingTop="32dp"
android:id="@+id/screenshot_pager"
android:layout_width="match_parent"
android:layout_height="200dp"/>
Expand All @@ -96,26 +31,96 @@
android:padding="16dp"
tools:text="Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."/>

<com.wefika.flowlayout.FlowLayout
android:id="@+id/tag_container"
</LinearLayout>

</android.support.v4.widget.NestedScrollView>

<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:expanded="false">

<android.support.v7.widget.Toolbar
android:id="@+id/details_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/AppTheme.Dark"
app:layout_scrollFlags="scroll|enterAlways"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">

<FrameLayout
android:id="@+id/icon_frame"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="top"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:visibility="gone">
<ImageView
android:id="@+id/icon_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="App icon"
android:visibility="invisible"/>
<ProgressBar
android:id="@+id/icon_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:visibility="visible"/>
</FrameLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|start"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingStart="16dp"/>
android:orientation="vertical">
<TextView
android:id="@+id/title_primary"
style="@style/TextAppearance.AppCompat.Title"
android:theme="@style/AppTheme.Dark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Lorem ipsum"/>
<TextView
android:id="@+id/title_secondary"
style="@style/TextAppearance.AppCompat.Caption"
android:theme="@style/AppTheme.Dark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Lorem ipsum"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

<com.wefika.flowlayout.FlowLayout
android:id="@+id/tag_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|start"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingLeft="32dp"
android:paddingRight="16dp"
android:paddingStart="16dp"
android:paddingBottom="16dp"/>

</android.support.design.widget.AppBarLayout>

<android.support.design.widget.FloatingActionButton
android:id="@+id/download_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/ic_file_download_white_24dp"
app:layout_anchor="@id/tag_container"
app:layout_anchorGravity="bottom|end"
app:fabSize="normal"/>

</FrameLayout>
</android.support.design.widget.CoordinatorLayout>

0 comments on commit 5154ad2

Please sign in to comment.