public static final class attr {
}
public static final class drawable {
- public static final int android=0x7f020000;
+ public static final int button=0x7f020000;
public static final int close=0x7f020001;
- public static final int icon=0x7f020002;
- public static final int open=0x7f020003;
- public static final int test2=0x7f020004;
- public static final int test3=0x7f020005;
+ public static final int dirnode=0x7f020002;
+ public static final int filenode=0x7f020003;
+ public static final int icon=0x7f020004;
+ public static final int notebook=0x7f020005;
+ public static final int open=0x7f020006;
}
public static final class id {
public static final int frameLayout=0x7f070008;
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+<!-- ボタンが押されている -->
+<!-- フォーカスされていない -->
+<item android:state_pressed="true"
+ android:state_focused="false">
+<layer-list>
+ <item>
+ <shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="270"
+ android:startColor="#93cdcc"
+ android:endColor="#e3e3e3"
+ android:type="linear" />
+ <corners
+ android:radius="4dip" />
+ <stroke
+ android:width="2dip"
+ android:color="#ffffff"/>
+ </shape>
+ </item>
+</layer-list>
+</item>
+
+<!-- ボタンが押されていない -->
+<!-- フォーカスされていない -->
+<item android:state_pressed="false"
+ android:state_focused="false">
+<layer-list>
+ <item>
+ <shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="270"
+ android:startColor="#e3e3e3"
+ android:endColor="#93cdcc"
+ android:type="linear" />
+ <corners
+ android:radius="4dip" />
+ <stroke
+ android:width="0.5dip"
+ android:color="#ffffff"/>
+ </shape>
+ </item>
+</layer-list>
+</item>
+
+<!-- ボタンが押されている -->
+<!-- フォーカスされた -->
+<item android:state_pressed="true"
+ android:state_focused="true">
+<layer-list>
+ <item>
+ <shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="270"
+ android:startColor="#93cdcc"
+ android:endColor="#e3e3e3"
+ android:type="linear" />
+ <corners
+ android:radius="4dip" />
+ <stroke
+ android:width="2dip"
+ android:color="#CC6600"/>
+ </shape>
+ </item>
+</layer-list>
+</item>
+
+<!-- ボタンが押されていない -->
+<!-- フォーカスされた -->
+<item android:state_pressed="false"
+ android:state_focused="true">
+<layer-list>
+ <item>
+ <shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient
+ android:angle="270"
+ android:startColor="#e3e3e3"
+ android:endColor="#93cdcc"
+ android:type="linear" />
+ <corners
+ android:radius="4dip" />
+ <stroke
+ android:width="0.5dip"
+ android:color="#FF6600"/>
+ </shape>
+ </item>
+</layer-list>
+</item>
+
+</selector>
+
<Button
android:id="@+id/leftButton"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="32dip"
android:layout_weight="1"
+ android:background="@drawable/button"
android:text="@+string/mainLeftButton" />
<Button
android:id="@+id/rightButton"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="32dip"
android:layout_weight="1"
+ android:background="@drawable/button"
android:text="@+string/mainRightButton" />
</LinearLayout>
bmpPaddingLeft = bmp.getWidth();
bmp = bitmapFactory.get(node.getIconId());
bmpWidth = bmp.getWidth();
+
+ float fSize = 32 * (2 / 3.0f);
+ leftButton.setTextSize(fSize);
+ rightButton.setTextSize(fSize);
} catch (Exception e) {
// TODO
e.printStackTrace();
}
private void updateList(Node node, int depth) {
- ScaleUtil scaleUtil = ScaleUtil.getInstance();
- float sd = scaleUtil.getScaledDensity();
int N = (int)(bmpWidth * 0.6);
int M = (int)(bmpWidth * 1.2);
int x = N * (depth - indent);
if (view.getNodeId() == id) {
selectedTarget = view;
target = view;
- selectedTarget.setAlpha(255);
- selectedTarget.setColorFilter(Color.RED, Mode.LIGHTEN);
+ setSelected(selectedTarget);
+
}
}
}
currentX = obj.getLeft();
currentY = obj.getTop();
- target.setAlpha(255);
- target.setColorFilter(Color.RED, Mode.LIGHTEN);
+ setSelected(target);
selectedTarget = target;
activity.targetSelectedChanged(true);
}
}
+ private void setSelected(LabelIconView t) {
+ t.setAlpha(255);
+ t.setColorFilter(0x88ff0000, Mode.LIGHTEN);
+ }
+
@Override
public boolean onLongClick(View view) {
if (!isElabledTouchEvent()){
@Override
public int getIconId() {
- return CommonUtil.isNull(this.getGuid()) ? R.drawable.test2
- : R.drawable.test3;
+ return CommonUtil.isNull(this.getGuid()) ? R.drawable.dirnode
+ : R.drawable.notebook;
}
@Override
@Override
public int getIconId(){
- return R.drawable.android;
+ return R.drawable.filenode;
}
}
long id;
Node top = new RootNode("", null);
+ top.setStatus(Node.Status.OPEN);
id = nodeDao.addNT(top);
top.setId(id);