2011年12月31日土曜日

Android Compatibility PackageでFragment

public class SandBoxActivity extends Activity {
package jp.gr.java.conf.ulexite.fragmenttest;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.ListFragment;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class TitlesFragment extends ListFragment {
private int mCurCheckPosition = 0;
private static final String[] mTitles = {"Title1", "Title2", "Title3", "Title4",
"Title5", "Title6", "Title7", "Title8"};

@Override
public void onActivityCreated(Bundle savedState) {
super.onActivityCreated(savedState);

ArrayAdapter titlesArray = new ArrayAdapter(getActivity(),
R.layout.title, mTitles);
setListAdapter(titlesArray);

if (savedState != null) {
mCurCheckPosition = savedState.getInt("curChoice", 0);
}

getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
showDetails(mCurCheckPosition);
}

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt("curChoice", mCurCheckPosition);
}

@Override
public void onListItemClick(ListView l, View v, int pos, long id) {
showDetails(pos);
}

private void showDetails(int index) {
mCurCheckPosition = index;

getListView().setItemChecked(index, true);

// Check what fragment is shown, replace if needed.
DetailsFragment details = (DetailsFragment)
getFragmentManager().findFragmentById(R.id.details);
if (details == null || details.getShownIndex() != index) {
// Make new fragment to show this selection.
details = DetailsFragment.newInstance(index);

// Execute a transaction, replacing any existing
// fragment with this one inside the frame.
FragmentTransaction ft
= getFragmentManager().beginTransaction();
ft.replace(R.id.details, details);
ft.setTransition(
FragmentTransaction.TRANSIT_FRAGMENT_FADE);
ft.commit();
}
}
}

2008年4月2日水曜日

丸紅売り

500円売りとなった本日であってもG-traderはなんと空売りを行いました。
正直あんまり根拠ないのですが、日経平均と逆行されている丸紅を売り
ました。買いが妥当なところなのですが、どうも恐怖症になってて。。

先日はビットアイル(買)でそれなりにもうけましたが。やはり続けられない。

[本日の取引]

丸紅717→702
5日移動平均:下降 25日移動平均:下降 75日移動平均:横ばい
直近の下値は2008年1月22日の550円あたり

[保有銘柄]

丸紅(売)

[注目売り銘柄]

丸三証券(561) 530円あたりを切ってくると注目

[注目買い銘柄]

ビットアイル(95,900) 10万を超えるかどうか