Revert "fix(map): make filter panel compact and scrollable"
This reverts commit dc63fffb67.
This commit is contained in:
@@ -22,7 +22,6 @@ import android.widget.ArrayAdapter;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ScrollView;
|
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -49,8 +48,6 @@ implements SensorEventListener {
|
|||||||
|
|
||||||
private LinearLayout filterPanel;
|
private LinearLayout filterPanel;
|
||||||
|
|
||||||
private ScrollView filterScroll;
|
|
||||||
|
|
||||||
private Spinner categorySpinner;
|
private Spinner categorySpinner;
|
||||||
private Spinner deviceSpinner;
|
private Spinner deviceSpinner;
|
||||||
|
|
||||||
@@ -210,6 +207,7 @@ implements SensorEventListener {
|
|||||||
dp(4)
|
dp(4)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
filterPanel.setVisibility(View.GONE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Category.
|
* Category.
|
||||||
@@ -389,28 +387,11 @@ implements SensorEventListener {
|
|||||||
|
|
||||||
filterPanel.addView(showAll);
|
filterPanel.addView(showAll);
|
||||||
|
|
||||||
/*
|
|
||||||
* Bounded to a third of the screen and scrollable, so every
|
|
||||||
* control stays reachable on short screens.
|
|
||||||
*/
|
|
||||||
filterScroll = new ScrollView(this);
|
|
||||||
|
|
||||||
filterScroll.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
filterScroll.addView(
|
|
||||||
filterPanel,
|
|
||||||
new android.widget.FrameLayout.LayoutParams(
|
|
||||||
android.widget.FrameLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
android.widget.FrameLayout.LayoutParams.WRAP_CONTENT
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
root.addView(
|
root.addView(
|
||||||
filterScroll,
|
filterPanel,
|
||||||
new LinearLayout.LayoutParams(
|
new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
0,
|
LinearLayout.LayoutParams.WRAP_CONTENT
|
||||||
1
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -460,7 +441,7 @@ implements SensorEventListener {
|
|||||||
new LinearLayout.LayoutParams(
|
new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
0,
|
0,
|
||||||
2
|
1
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -495,12 +476,19 @@ implements SensorEventListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
||||||
filterScroll.setVisibility(
|
if (filterPanel.getVisibility()
|
||||||
filterScroll.getVisibility()
|
== View.VISIBLE) {
|
||||||
== View.VISIBLE
|
|
||||||
? View.GONE
|
filterPanel.setVisibility(
|
||||||
: View.VISIBLE
|
View.GONE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
filterPanel.setVisibility(
|
||||||
|
View.VISIBLE
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -658,7 +646,7 @@ implements SensorEventListener {
|
|||||||
/*
|
/*
|
||||||
* Collapse after applying.
|
* Collapse after applying.
|
||||||
*/
|
*/
|
||||||
filterScroll.setVisibility(
|
filterPanel.setVisibility(
|
||||||
View.GONE
|
View.GONE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -710,8 +698,8 @@ implements SensorEventListener {
|
|||||||
|
|
||||||
return new LinearLayout.LayoutParams(
|
return new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
dp(38)
|
dp(42)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TextView smallLabel(String text) {
|
private TextView smallLabel(String text) {
|
||||||
|
|||||||
Reference in New Issue
Block a user