Kaydet (Commit) 1816bdd1 authored tarafından Miklos Vajna's avatar Miklos Vajna

android: Adpater -> Adapter

Change-Id: If5297d641b4a596f20bdde8203f199d8efcb92fe
üst 2e0c474a
......@@ -11,12 +11,12 @@ import android.widget.TextView;
import java.util.List;
public class DocumentPartViewListAdpater extends ArrayAdapter<DocumentPartView> {
private static final String LOGTAG = DocumentPartViewListAdpater.class.getSimpleName();
public class DocumentPartViewListAdapter extends ArrayAdapter<DocumentPartView> {
private static final String LOGTAG = DocumentPartViewListAdapter.class.getSimpleName();
private final Activity activity;
public DocumentPartViewListAdpater(Activity activity, int resource, List<DocumentPartView> objects) {
public DocumentPartViewListAdapter(Activity activity, int resource, List<DocumentPartView> objects) {
super(activity, resource, objects);
this.activity = activity;
}
......
......@@ -91,7 +91,7 @@ public class LOKitTileProvider implements TileProvider {
LOKitShell.getMainHandler().post(new Runnable() {
@Override
public void run() {
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdpater().notifyDataSetChanged();
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdapter().notifyDataSetChanged();
}
});
}
......
......@@ -40,7 +40,7 @@ public class LibreOfficeMainActivity extends Activity {
private RelativeLayout mGeckoLayout;
private ListView mDrawerList;
private List<DocumentPartView> mDocumentPartView = new ArrayList<DocumentPartView>();
private DocumentPartViewListAdpater mDocumentPartViewListAdpater;
private DocumentPartViewListAdapter mDocumentPartViewListAdapter;
private String mInputFile;
public static GeckoLayerClient getLayerClient() {
......@@ -106,11 +106,11 @@ public class LibreOfficeMainActivity extends Activity {
mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
if (mDocumentPartViewListAdpater == null) {
if (mDocumentPartViewListAdapter == null) {
mDrawerList = (ListView) findViewById(R.id.left_drawer);
mDocumentPartViewListAdpater = new DocumentPartViewListAdpater(this, R.layout.document_part_list_layout, mDocumentPartView);
mDrawerList.setAdapter(mDocumentPartViewListAdpater);
mDocumentPartViewListAdapter = new DocumentPartViewListAdapter(this, R.layout.document_part_list_layout, mDocumentPartView);
mDrawerList.setAdapter(mDocumentPartViewListAdapter);
mDrawerList.setOnItemClickListener(new DocumentPartClickListener());
}
......@@ -169,8 +169,8 @@ public class LibreOfficeMainActivity extends Activity {
return mDocumentPartView;
}
public DocumentPartViewListAdpater getDocumentPartViewListAdpater() {
return mDocumentPartViewListAdpater;
public DocumentPartViewListAdapter getDocumentPartViewListAdapter() {
return mDocumentPartViewListAdapter;
}
private void showAbout() {
......@@ -237,7 +237,7 @@ public class LibreOfficeMainActivity extends Activity {
private class DocumentPartClickListener implements android.widget.AdapterView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DocumentPartView partView = mDocumentPartViewListAdpater.getItem(position);
DocumentPartView partView = mDocumentPartViewListAdapter.getItem(position);
LOKitShell.sendEvent(LOEventFactory.changePart(partView.getPartIndex()));
mDrawerLayout.closeDrawer(mDrawerList);
}
......
......@@ -19,12 +19,12 @@ public class MockTileProvider implements TileProvider {
for (int i = 0; i < 5; i++) {
String partName = "Part " + i;
DocumentPartView partView = new DocumentPartView(i, partName, null);
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdpater().add(partView);
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdapter().add(partView);
}
LibreOfficeMainActivity.mAppContext.mMainHandler.post(new Runnable() {
@Override
public void run() {
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdpater().notifyDataSetChanged();
LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdapter().notifyDataSetChanged();
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment