Skip to content

Commit

Permalink
Renamed almost everything to better names
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaime committed Jan 13, 2017
1 parent 92ce191 commit 29b634b
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 281 deletions.
1 change: 1 addition & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tmp.trackmyprint">
package="org.fontys.trackmyprint">

<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Expand All @@ -19,7 +19,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".nfcActivity">
<activity android:name=".NFCActivity">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />

Expand All @@ -28,9 +28,8 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".mapActivity" />
<activity android:name=".userProcessListActivity" />
<activity android:name=".printDetails"></activity>
<activity android:name=".MapActivity" />
<activity android:name=".PrintDetailsActivity"></activity>
</application>

</manifest>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint;

import android.content.Intent;
import android.os.Bundle;
Expand All @@ -9,6 +9,7 @@
import android.widget.ListView;
import android.widget.TextView;

import org.fontys.trackmyprint.adapters.ProductPhaseListAdapter;
import org.fontys.trackmyprint.database.Database;
import org.fontys.trackmyprint.database.DatabaseException;
import org.fontys.trackmyprint.database.DatabaseListener;
Expand All @@ -28,7 +29,7 @@ public class MainActivity extends AppCompatActivity implements DatabaseListener
{
private Employee currentEmployee;

private production_proccess_list_adapter adapter;
private ProductPhaseListAdapter adapter;

private ImageButton btnScan;

Expand Down Expand Up @@ -114,7 +115,7 @@ private void updateGUIPhase(Phase p){
}
else
{
status.setImageResource(R.drawable.checkedinbtn);
status.setImageResource(R.drawable.checkedin_btn);
lblScan.setText("Scan a product");
btnScan.setImageResource(R.color.colorScanButton);

Expand All @@ -124,7 +125,7 @@ private void updateGUIPhase(Phase p){
public void onClick(View v)
{
if(getCurrentPhase()!= null){
Intent intent = new Intent(MainActivity.this, nfcActivity.class);
Intent intent = new Intent(MainActivity.this, NFCActivity.class);
startActivity(intent);
}
}
Expand Down Expand Up @@ -174,7 +175,7 @@ public void onPhasesInitialized(Map<String, Phase> phases)

listPhases.addAll(phases.values());

this.adapter = new production_proccess_list_adapter(this, listPhases);
this.adapter = new ProductPhaseListAdapter(this, listPhases);
ListView productionProcessListView = (ListView) findViewById(R.id.production_proccess);
productionProcessListView.setAdapter(this.adapter);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class mapActivity extends AppCompatActivity {
public class MapActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint;

import android.app.Activity;
import android.app.PendingIntent;
Expand All @@ -17,6 +17,8 @@
import android.widget.TextView;
import android.widget.Toast;

import org.fontys.trackmyprint.MainActivity;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

Expand All @@ -26,7 +28,7 @@
*
* @author Ralf Wondratschek
*/
public class nfcActivity extends AppCompatActivity {
public class NFCActivity extends AppCompatActivity {

public static final String MIME_TEXT_PLAIN = "text/plain";
public static final String TAG = "NfcDemo";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class printDetails extends AppCompatActivity {
public class PrintDetailsActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint.adapters;

import android.content.Context;
import android.view.LayoutInflater;
Expand All @@ -8,6 +8,8 @@
import android.widget.ImageButton;
import android.widget.TextView;

import org.fontys.trackmyprint.MainActivity;
import org.fontys.trackmyprint.R;
import org.fontys.trackmyprint.database.entities.Phase;

import java.util.List;
Expand All @@ -16,9 +18,9 @@
* Created by fhict on 08/12/2016.
*/

public class production_proccess_list_adapter extends ArrayAdapter<Phase> {
public class ProductPhaseListAdapter extends ArrayAdapter<Phase> {

public production_proccess_list_adapter(Context context, List<Phase> phases) {
public ProductPhaseListAdapter(Context context, List<Phase> phases) {
super(context, R.layout.production_proccess_item, phases);
}

Expand All @@ -37,18 +39,18 @@ public View getView(int position, View convertView, ViewGroup parent) {
public void onClick(View v) {
if (MainActivity.getInstance().getCurrentPhase() != pp) {
MainActivity.getInstance().setCurrentPhase(pp);
checkIn.setImageResource(R.drawable.icon_user_vink);
checkIn.setImageResource(R.drawable.productphase_checked);
} else {
MainActivity.getInstance().setCurrentPhase(null);
checkIn.setImageResource(R.drawable.checkinbtn);
checkIn.setImageResource(R.drawable.checkin_btn);
}
}

});
if (MainActivity.getInstance().getCurrentPhase() != pp) {
checkIn.setImageResource(R.drawable.checkinbtn);
checkIn.setImageResource(R.drawable.checkin_btn);
} else {
checkIn.setImageResource(R.drawable.icon_user_vink);
checkIn.setImageResource(R.drawable.productphase_checked);
}
return cv;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.example.tmp.trackmyprint;
package org.fontys.trackmyprint.lib;

import org.fontys.trackmyprint.database.entities.Phase;

/**
* Created by fhict on 08/12/2016.
*/

public class production_proccess {
public class ProductPhase {

public String name;
public String iconName;
public Phase phase;

public production_proccess(String name, String iconName, Phase phase) {
public ProductPhase(String name, String iconName, Phase phase) {
this.phase = phase;
this.name = name;
this.name = iconName;
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.tmp.trackmyprint.MainActivity">
tools:context=".MainActivity">

<ImageView
android:layout_width="0dp"
Expand All @@ -22,7 +22,7 @@
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/profileimage"
app:srcCompat="@drawable/dummy_profileimage"
android:id="@+id/profile_image"
app:layout_constraintBottom_toBottomOf="@+id/top"
app:layout_constraintTop_toTopOf="@+id/top"
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/activity_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:id="@+id/activity_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.tmp.trackmyprint.mapActivity">
tools:context=".MapActivity">


<ImageView
Expand All @@ -22,7 +22,7 @@
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/profileimage"
app:srcCompat="@drawable/dummy_profileimage"
android:id="@+id/profile_image"
app:layout_constraintBottom_toBottomOf="@+id/top"
app:layout_constraintTop_toTopOf="@+id/top"
Expand Down Expand Up @@ -77,7 +77,7 @@
android:layout_marginTop="20dp" />

<ImageButton
app:srcCompat="@drawable/printer_solid"
app:srcCompat="@drawable/printer_oval"
android:id="@+id/printBtn"
android:background="@android:color/transparent"
android:minWidth="0dp"
Expand All @@ -95,7 +95,7 @@
app:layout_constraintVertical_bias="0.76" />

<ImageButton
app:srcCompat="@drawable/cutting_solid"
app:srcCompat="@drawable/cutting_oval"
android:id="@+id/cutBtn"
android:background="@android:color/transparent"
android:minWidth="0dp"
Expand All @@ -111,7 +111,7 @@
app:layout_constraintHorizontal_bias="0.44" />

<ImageButton
app:srcCompat="@drawable/quality_control_solid"
app:srcCompat="@drawable/quality_control_oval"
android:id="@+id/qualityBtn"
android:background="@android:color/transparent"
android:minWidth="0dp"
Expand All @@ -127,7 +127,7 @@
app:layout_constraintVertical_bias="0.45" />

<ImageButton
app:srcCompat="@drawable/packing_solid"
app:srcCompat="@drawable/packing_oval"
android:id="@+id/packagingBtn"
android:background="@android:color/transparent"
android:minWidth="0dp"
Expand All @@ -143,7 +143,7 @@
app:layout_constraintVertical_bias="0.26" />

<ImageButton
app:srcCompat="@drawable/shipped_solid"
app:srcCompat="@drawable/shipped_oval"
android:id="@+id/shippingBtn"
android:background="@android:color/transparent"
android:minWidth="0dp"
Expand All @@ -161,7 +161,7 @@
app:layout_constraintVertical_bias="0.060000002" />

<ImageButton
app:srcCompat="@drawable/view_on_map"
app:srcCompat="@drawable/view_on_map_btn"
android:id="@+id/viewInlistBtn"
android:minHeight="0dp"
android:minWidth="0dp"
Expand All @@ -183,7 +183,7 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintHorizontal_bias="1.0"
android:background="@drawable/shipbtn"
android:background="@drawable/ship_btn"
android:textColor="@android:color/background_light" />

</android.support.constraint.ConstraintLayout>
Loading

0 comments on commit 29b634b

Please sign in to comment.