Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix App Icon and improve App Layout and Colors #12

Merged
merged 4 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package at.htl_villach.docker2go;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
Expand All @@ -18,6 +19,12 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_container_detail);

//Back button
if(getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}

//Set title of this activity
getSupportActionBar().setTitle(getString(R.string.title_activity_container_detail));

Expand All @@ -32,29 +39,15 @@ protected void onCreate(Bundle savedInstanceState) {
Toast.makeText(getApplicationContext(), "Fatal issue: No Arguments", Toast.LENGTH_SHORT).show();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_overview, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.actionDisconnect) {
if(item.getItemId() == android.R.id.home) {
finish();
return true;
}

return super.onOptionsItemSelected(item);
}


public void loadContainerData(String containerID) {
//Create command based on containerID
DockerCommandBuilder imagesCommand = new DockerCommandBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ public String getFormattedValue(float value, Entry entry, int dataSetIndex, View
}
});

PieData data = new PieData(labels, dataSet);

pieChart.setData(data);

// set custom colors
int[] colors = new int[]{
ContextCompat.getColor(getContext(), R.color.containersRunning),
Expand All @@ -117,6 +113,10 @@ public String getFormattedValue(float value, Entry entry, int dataSetIndex, View
};
dataSet.setColors(colors);

PieData data = new PieData(labels, dataSet);

pieChart.setData(data);

// text in the middle
String middleStr = String.format("%d/%d \n %s",
dInfo.getContainersRunning(),
Expand Down
47 changes: 24 additions & 23 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1000"
android:viewportHeight="1000">
<group android:translateX="250"
android:translateY="250">
<path
android:strokeWidth="1"
android:pathData="M-174.1,427.6c65.3,-5.3 142.5,-19.1 224.6,-50.6c19.7,-7.6 38.4,-15.6 56,-24c-11.5,-16.2 -37.6,-57.6 -39,-116c-1.9,-81.6 46,-136.1 57,-148c21.7,14.2 59.7,43.5 87,94c14.9,27.6 22.2,53.4 26,73c21.6,-6.7 69,-18 125,-3c31,8.3 54.5,22.1 70,33c-8.2,22.2 -26.9,61.8 -68,90c-2.6,1.8 -12.9,8.8 -29,16c-22.1,9.9 -66.2,25.4 -131,19c-7.5,19.5 -16.4,40.3 -27,62c-12,24.5 -23,43.6 -28,52c-32.8,54.7 -81,102 -103.5,123c-46.1,42.9 -87.8,71.2 -150,113c-18.9,12.7 -34.8,22.9 -46,30"
android:fillColor="#FFFFFF">
<aapt:attr name="android:strokeColor">
<gradient
android:startY="439.8864"
android:startX="-174.1249"
android:endY="439.8864"
android:endX="433.1025"
android:type="linear">
<item android:offset="0" android:color="#FFEF456D"/>
<item android:offset="0.3081" android:color="#FFEF485F"/>
<item android:offset="0.9873" android:color="#FFF04E35"/>
<item android:offset="1" android:color="#FFF04E34"/>
</gradient>
</aapt:attr>
</path>
</group>
android:viewportWidth="500"
android:viewportHeight="500">
<path
android:pathData="M0,0h500v500h-500z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="250"
android:startX="500"
android:endY="250"
android:endX="0"
android:type="linear">
<item android:offset="0" android:color="#FFEF456D"/>
<item android:offset="0.3081" android:color="#FFEF485F"/>
<item android:offset="0.9873" android:color="#FFF04E35"/>
<item android:offset="1" android:color="#FFF04E34"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M167.9,308.9c-6.6,-9.3 -21.5,-33 -22.3,-66.4c-1.1,-46.7 26.3,-77.9 32.6,-84.7c12.4,8.1 34.2,24.9 49.8,53.8c8.5,15.8 12.7,30.6 14.9,41.8c12.4,-3.8 39.5,-10.3 71.5,-1.7c17.7,4.7 31.2,12.6 40.1,18.9c-4.7,12.7 -15.4,35.4 -38.9,51.5c-1.5,1 -7.4,5 -16.6,9.2c-12.6,5.7 -37.9,14.5 -75,10.9c-4.3,11.2 -9.4,23.1 -15.4,35.5c-6.9,14 -13.2,24.9 -16,29.8c-18.8,31.3 -46.3,58.4 -59.2,70.4c-25.9,21.7 -54.4,43.5 -85.8,64.7c-8.8,6 -17.6,11.7 -26.3,17.2c-44.4,23.5 -96,47.4 -154.4,69.3c-51.6,19.3 -100.1,33.7 -144.2,44.6c-45.8,-95.8 -91.5,-191.7 -137.3,-287.5c172.3,9.8 356.6,-5.8 544.1,-64.4C142.3,317.5 155.2,313.3 167.9,308.9z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M178.2,157.9l-32.6,84.7l22.3,66.3l56.1,33.2l33.7,0l96.7,-71.5l-111.6,-17.2z"
android:fillColor="#FFFFFF"/>
</vector>
236 changes: 70 additions & 166 deletions app/src/main/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,170 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_connection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
android:layout_height="match_parent"
tools:context="at.htl_villach.docker2go.ConnectionActivity">


<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand All @@ -30,7 +29,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:divider="@null"
android:dividerHeight="0dp" />
android:dividerHeight="-16dp"/>
</android.support.constraint.ConstraintLayout>

<android.support.design.widget.FloatingActionButton
Expand Down
Loading