Skip to content

Commit 27747bc

Browse files
- CHG: Changed the height of the image section on the node details view to be more prominent.
- BUG: Fixed sizing of related items on the node details view.
1 parent 7936bed commit 27747bc

13 files changed

Lines changed: 42 additions & 28 deletions

File tree

.idea/encodings.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/app-release.apk

193 KB
Binary file not shown.

app/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ android {
2525
}
2626

2727
compileSdkVersion 25
28-
buildToolsVersion "25.0.0"
28+
buildToolsVersion "25.0.2"
2929
defaultConfig {
3030
applicationId "uk.ac.hutton.ics.buntata"
3131
minSdkVersion 16
3232
targetSdkVersion 25
33-
versionCode 9
34-
versionName "0.17.04.12"
33+
versionCode 10
34+
versionName "0.17.04.19"
3535
multiDexEnabled true
3636
}
3737

@@ -76,12 +76,12 @@ repositories {
7676

7777
dependencies {
7878
compile fileTree(dir: 'libs', include: ['*.jar'])
79-
compile 'com.google.android.gms:play-services-analytics:10.2.0'
80-
compile 'com.android.support:appcompat-v7:25.2.0'
81-
compile 'com.android.support:recyclerview-v7:25.2.0'
82-
compile 'com.android.support:cardview-v7:25.2.0'
83-
compile 'com.android.support:design:25.2.0'
84-
compile 'com.android.support:palette-v7:25.2.0'
79+
compile 'com.google.android.gms:play-services-analytics:10.2.1'
80+
compile 'com.android.support:appcompat-v7:25.3.1'
81+
compile 'com.android.support:recyclerview-v7:25.3.1'
82+
compile 'com.android.support:cardview-v7:25.3.1'
83+
compile 'com.android.support:design:25.3.1'
84+
compile 'com.android.support:palette-v7:25.3.1'
8585
compile 'com.squareup.picasso:picasso:2.5.2'
8686
compile 'com.heinrichreimersoftware:material-intro:1.6'
8787
compile 'me.relex:circleindicator:1.2.1@aar'

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
<data
6060
android:host="bunta.ta"
6161
android:scheme="http"/>
62+
<data
63+
android:host="ics.hutton.ac.uk"
64+
android:scheme="https"
65+
android:pathPrefix="/resources/roadshow-staff/"/>
6266
</intent-filter>
6367
</activity>
6468
<activity android:name=".activity.AboutActivity"/>

app/src/main/java/uk/ac/hutton/ics/buntata/activity/NodeDetailsActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ else if (args != null)
184184
appBarLayout.setFitsSystemWindows(false);
185185
}
186186

187+
float heightDp = getResources().getDisplayMetrics().heightPixels / 1.5f;
188+
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) appBarLayout.getLayoutParams();
189+
lp.height = (int) heightDp;
190+
187191
/* Get all the attributes */
188192
List<BuntataAttributeValueAdvanced> attributeValues = new AttributeValueManager(this, datasourceId).getForNode(nodeId);
189193

app/src/main/java/uk/ac/hutton/ics/buntata/adapter/NodeAdapter.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ public void onBindViewHolder(final ViewHolder holder, int position)
161161
{
162162
holder.image.setTransitionName(context.getString(R.string.transition_node_view));
163163
}
164-
// else
165-
// {
166-
// viewWidth = context.getResources().getDimensionPixelSize(R.dimen.node_image_height) / 2;
167-
// holder.image.setMaxHeight(viewWidth);
168-
// holder.image.setMaxWidth(viewWidth);
169-
// holder.layout.getLayoutParams().width = viewWidth;
170-
// }
164+
/* If this is within the NodeDetailsActivity, then restrict the size of the items */
165+
if (context instanceof NodeDetailsActivity)
166+
{
167+
viewWidth = context.getResources().getDimensionPixelSize(R.dimen.node_image_height) / 2;
168+
holder.image.setMaxHeight(viewWidth);
169+
holder.image.setMaxWidth(viewWidth);
170+
holder.layout.getLayoutParams().width = viewWidth;
171+
}
171172

172173
holder.image.setMinimumHeight(viewWidth);
173174

app/src/main/java/uk/ac/hutton/ics/buntata/database/manager/NodeManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public List<BuntataNodeAdvanced> getSimilarNodes(int sourceId)
138138
{
139139
open();
140140

141-
Cursor cursor = database.rawQuery("SELECT * FROM nodes WHERE EXISTS (SELECT 1 FROM similarities WHERE (similarities.node_a_id = nodes.id AND similarities.node_b_id = ?) OR (similarities.node_b_id = nodes.id AND similarities.node_a_id = ?)) ORDER BY nodes.name", new String[]{Integer.toString(sourceId), Integer.toString(sourceId)});
141+
Cursor cursor = database.rawQuery("SELECT * FROM nodes WHERE EXISTS (SELECT 1 FROM similarities WHERE (similarities.node_a_id = ? AND similarities.node_b_id = nodes.id)) ORDER BY nodes.name", new String[]{Integer.toString(sourceId)});
142142
cursor.moveToFirst();
143143
while (!cursor.isAfterLast())
144144
{

app/src/main/res/drawable/ahdb.png

-134 KB
Loading

app/src/main/res/layout/fragment_node.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
android:text="@string/node_instructions"/>
3232

3333
<android.support.v7.widget.RecyclerView
34-
xmlns:android="http://schemas.android.com/apk/res/android"
3534
android:id="@+id/node_recycler_view"
3635
android:layout_width="match_parent"
3736
android:layout_height="match_parent"

0 commit comments

Comments
 (0)