Skip to content

Commit

Permalink
more beautiful spinner... now is a good time for a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
sasehash committed Jun 5, 2018
1 parent a0c8bea commit 56e761c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/org/sasehash/burgerwp/Configurator.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* Licensed under GPL 3.0
*/

/*
* Licensed under GPL 3.0
*/

package org.sasehash.burgerwp;

import android.content.Context;
Expand Down Expand Up @@ -82,7 +86,6 @@ public class Configurator extends AppCompatActivity {
public ArrayList<String> prefvalues;
public ArrayList<Type> prefvaluesType;

//TODO : recheck
public static ArrayList<String> getPrefvalues(Context context) {
return new ArrayList<>(Arrays.asList(context.getResources().getStringArray(R.array.configuratorParametersName)));
}
Expand Down Expand Up @@ -585,9 +588,9 @@ public void onClick(View v) {
R.drawable.noel,
};
//spinner with externalImage, internalImages
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, R.layout.selector, vals);
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, vals);
arrayAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);

//TODO : make this spinner more beautiful
Spinner spinner = new Spinner(this);
spinner.setAdapter(arrayAdapter);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
Expand Down Expand Up @@ -663,6 +666,7 @@ public void removeRow(View v) {

}

//TODO : rewrite this method (removeRow)
public void removeRow(String s, View v) {
if (rowsList.size() < 1) {
return;
Expand All @@ -672,7 +676,6 @@ public void removeRow(String s, View v) {
if (abc == null) {
throw new IllegalStateException("broken settings! objects not found!");
}
//TODO : find better unique keys that are better then "rowslist.size()" !
abc.remove(s);
newSettings.putStringSet("objects", abc);
tabelle.removeView(rowsList.get(rowsList.size() - 1));
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/org/sasehash/burgerwp/IDrawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
* Licensed under GPL 3.0
*/

/*
* Licensed under GPL 3.0
*/

package org.sasehash.burgerwp;

import android.graphics.Canvas;
Expand All @@ -41,4 +45,10 @@ public interface IDrawable {
boolean canBeReplaced();

void event(MotionEvent event);

//TODO: add following methods to IDrawable
// static IDrawable import(String objectName, SharedPreferences prefs),
// void export(String objectName, SharedPreferences prefs) and
// create(

}
9 changes: 0 additions & 9 deletions app/src/main/res/layout/selector.xml

This file was deleted.

0 comments on commit 56e761c

Please sign in to comment.