sajadpm
چهارشنبه 25 بهمن 1391, 21:35 عصر
با سلام و خسته نباشید
من از آموزش آقا srfarzad برای فارسی نویسی استفاده می کنم . حالا به مشکل بر خوردم من می خواهم در listview از این PersianReshape استفاده کنم ؟ ممنون می شوم کمکم کنید .
این هم listview :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list_n);
mListView = (ListView) findViewById(R.id.listview);
mAdapter = new SimpleCursorAdapter(getBaseContext(),
R.layout.listview_item_layout,
null,
new String[] { "subn", "sar" },
new int[] { R.id.name, R.id.phone }, 0);
mListView.setAdapter(mAdapter);
mListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> listView, View view,
int position, long id) {
// Get the cursor, positioned to the corresponding row in the result set
Cursor cursor = (Cursor) listView.getItemAtPosition(position);
// Get the state's capital from this row in the database.
String countryCode =
cursor.getString(cursor.getColumnIndexOrThrow("subn"));
Intent intent = new Intent(Lista.this, Subn.class);
intent.putExtra("subn1",countryCode);
startActivity(intent);
}
});}
من از آموزش آقا srfarzad برای فارسی نویسی استفاده می کنم . حالا به مشکل بر خوردم من می خواهم در listview از این PersianReshape استفاده کنم ؟ ممنون می شوم کمکم کنید .
این هم listview :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list_n);
mListView = (ListView) findViewById(R.id.listview);
mAdapter = new SimpleCursorAdapter(getBaseContext(),
R.layout.listview_item_layout,
null,
new String[] { "subn", "sar" },
new int[] { R.id.name, R.id.phone }, 0);
mListView.setAdapter(mAdapter);
mListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> listView, View view,
int position, long id) {
// Get the cursor, positioned to the corresponding row in the result set
Cursor cursor = (Cursor) listView.getItemAtPosition(position);
// Get the state's capital from this row in the database.
String countryCode =
cursor.getString(cursor.getColumnIndexOrThrow("subn"));
Intent intent = new Intent(Lista.this, Subn.class);
intent.putExtra("subn1",countryCode);
startActivity(intent);
}
});}