Home
last modified time | relevance | path

Searched refs:getContext (Results 1 – 25 of 132) sorted by relevance

123456

/development/samples/MySampleRss/src/com/example/codelab/rssexample/
DRssContentProvider.java104 final Context con = getContext(); in onCreate()
106 mDb = mDbHelper.openDatabase(getContext(), DATABASE_NAME, null, DB_VERSION); in onCreate()
165 c.setNotificationUri(getContext().getContentResolver(), uri); in query()
175 getContext().getContentResolver().notifyUpdate(uri, null); in update()
189 getContext().getContentResolver().notifyInsert(CONTENT_URI, null); in insert()
199 getContext().getContentResolver().notifyDelete(uri, null); in delete()
/development/samples/Support7Demos/src/com/example/android/supportv7/app/
DActionBarSettingsActionProviderActivity.java72 LayoutInflater layoutInflater = LayoutInflater.from(getContext()); in onCreateActionView()
79 getContext().startActivity(sSettingsIntent); in onCreateActionView()
89 getContext().startActivity(sSettingsIntent); in onPerformDefaultAction()
/development/samples/SupportLeanbackDemos/src/com/example/android/leanback/
DStringPresenter.java26 TextView tv = new TextView(parent.getContext()); in onCreateViewHolder()
30 parent.getContext().getResources().getDrawable(R.drawable.text_bg)); in onCreateViewHolder()
DCardPresenter.java62 ImageCardView v = new ImageCardView(parent.getContext()); in onCreateViewHolder()
66 v.setMainImageDimensions(LayoutParams.WRAP_CONTENT, getRowHeight(parent.getContext())); in onCreateViewHolder()
74 Drawable drawable = viewHolder.view.getContext().getResources() in onBindViewHolder()
/development/samples/ApiDemos/tests/src/com/example/android/apis/app/
DLocalServiceTest.java66 startIntent.setClass(getContext(), LocalService.class); in testStartable()
76 startIntent.setClass(getContext(), LocalService.class); in testBindable()
/development/samples/browseable/StorageProvider/src/com.example.android.storageprovider/
DMyCloudProvider.java96 mBaseDir = getContext().getFilesDir(); in onCreate()
125 row.add(Root.COLUMN_SUMMARY, getContext().getString(R.string.root_summary)); in queryRoots()
136 row.add(Root.COLUMN_TITLE, getContext().getString(R.string.app_name)); in queryRoots()
308 Handler handler = new Handler(getContext().getMainLooper()); in openDocument()
579 InputStream ins = getContext().getResources().openRawResource(resId);
589 String filename = getContext().getResources().getResourceEntryName(resId) + extension;
590 FileOutputStream fos = getContext().openFileOutput(filename, Context.MODE_PRIVATE);
600 TypedArray ar = getContext().getResources().obtainTypedArray(arrayResId);
615 getContext().getSharedPreferences(getContext().getString(R.string.app_name),
617 return sharedPreferences.getBoolean(getContext().getString(R.string.key_logged_in), false);
/development/samples/training/threadsample/src/com/example/android/threadsample/
DDataProvider.java226 mHelper = new DataProviderHelper(getContext()); in onCreate()
261 returnCursor.setNotificationUri(getContext().getContentResolver(), uri); in query()
326 getContext().getContentResolver().notifyChange(uri, null); in insert()
394 getContext().getContentResolver().notifyChange(uri, null); in bulkInsert()
468 getContext().getContentResolver().notifyChange(uri, null); in update()
/development/samples/browseable/BasicSyncAdapter/src/com.example.android.basicsyncadapter/provider/
DFeedProvider.java65 mDatabaseHelper = new FeedDatabase(getContext()); in onCreate()
109 Context ctx = getContext(); in query()
138 Context ctx = getContext(); in insert()
170 Context ctx = getContext(); in delete()
201 Context ctx = getContext(); in update()
/development/samples/Support4Demos/src/com/example/android/supportv4/accessibility/
DAccessibilityDelegateSupportActivity.java80 event.getText().add(getContext().getString( in installAccessibilityDelegate()
91 info.setText(getContext().getString( in installAccessibilityDelegate()
/development/samples/ApiDemos/src/com/example/android/apis/app/
DLoaderCustom.java119 return mLoader.getContext().getResources().getDrawable( in getIcon()
192 mLoader.getContext().registerReceiver(this, filter); in PackageIntentReceiver()
197 mLoader.getContext().registerReceiver(this, sdFilter); in PackageIntentReceiver()
222 mPm = getContext().getPackageManager(); in AppListLoader()
239 final Context context = getContext(); in loadInBackground()
303 boolean configChange = mLastConfig.applyNewConfig(getContext().getResources()); in onStartLoading()
349 getContext().unregisterReceiver(mPackageObserver); in onReset()
DLoaderThrottle.java202 mOpenHelper = new DatabaseHelper(getContext()); in onCreate()
246 c.setNotificationUri(getContext().getContentResolver(), uri); in query()
294 getContext().getContentResolver().notifyChange(noteUri, null); in insert()
332 getContext().getContentResolver().notifyChange(uri, null); in delete()
364 getContext().getContentResolver().notifyChange(uri, null); in update()
/development/samples/Support4Demos/src/com/example/android/supportv4/app/
DLoaderCustomSupport.java121 return mLoader.getContext().getResources().getDrawable( in getIcon()
194 mLoader.getContext().registerReceiver(this, filter); in PackageIntentReceiver()
199 mLoader.getContext().registerReceiver(this, sdFilter); in PackageIntentReceiver()
224 mPm = getContext().getPackageManager(); in AppListLoader()
241 final Context context = getContext(); in loadInBackground()
305 boolean configChange = mLastConfig.applyNewConfig(getContext().getResources()); in onStartLoading()
351 getContext().unregisterReceiver(mPackageObserver); in onReset()
/development/samples/browseable/BatchStepSensor/src/com.example.android.batchstepsensor/cardstream/
DCardStreamLinearLayout.java244 animator = mAnimators.getDisappearingAnimator(getContext()); in onLayout()
247 animator = mAnimators.getAppearingAnimator(getContext()); in onLayout()
278 mSwipeSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); in isSwiping()
381 mAnimators.getAppearingAnimator(getContext()) ); in setCardStreamAnimator()
383 mAnimators.getDisappearingAnimator(getContext()) ); in setCardStreamAnimator()
402 TypedArray a = getContext().obtainStyledAttributes(attrs, in initialize()
436 mSwipeSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); in initialize()
471 ObjectAnimator animator = mAnimators.getInitalAnimator(getContext()); in runInitialAnimations()
/development/samples/Vault/src/com/example/android/vault/
DVaultProvider.java135 mKeyFile = new File(getContext().getFilesDir(), "vault.key"); in onCreate()
136 mDocumentsDir = new File(getContext().getFilesDir(), "documents"); in onCreate()
141 loadOrGenerateKeys(getContext(), mKeyFile); in onCreate()
210 row.add(Root.COLUMN_TITLE, getContext().getString(R.string.app_label)); in queryRoots()
216 row.add(Root.COLUMN_SUMMARY, getContext().getString(R.string.info_software)); in queryRoots()
300 final SharedPreferences prefs = getContext() in createDocument()
432 getContext().getContentResolver().notifyChange( in deleteDocumentReferences()
468 result.setNotificationUri(getContext().getContentResolver(), in queryChildDocuments()
474 getContext().getString(R.string.info_software_detail)); in queryChildDocuments()
/development/apps/launchperf/src/com/android/launchperf/
DEmptyActivityLaunchPerformance.java40 mIntent.setClassName(getContext(), "com.android.launchperf.EmptyActivity"); in onCreate()
DSimpleActivityLaunchPerformance.java40 mIntent.setClassName(getContext(), "com.android.launchperf.SimpleActivity"); in onCreate()
DComplexActivityLaunchPerformance.java41 mIntent.setClassName(getContext(), "com.android.launchperf.ComplexActivity"); in onCreate()
/development/samples/XmlAdapters/src/com/example/android/xmladapters/
DUrlIntentListener.java36 final Context context = parent.getContext(); in onItemClick()
/development/samples/wearable/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/
DBackgroundPickers.java59 LayoutInflater inflater = LayoutInflater.from(mContainer.getContext()); in generatePickers()
86 Context context = mContainer.getContext(); in getRes()
/development/samples/browseable/SwipeRefreshLayoutBasic/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()
/development/samples/browseable/FragmentTransition/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()
/development/samples/browseable/SlidingTabsBasic/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()
/development/samples/browseable/SwipeRefreshListFragment/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()
/development/samples/browseable/SlidingTabsColors/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()
/development/samples/browseable/BasicTransition/src/com.example.android.common/view/
DSlidingTabLayout.java181 getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, in createDefaultTabView()
207 tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, in populateTabStrip()
213 tabView = createDefaultTabView(getContext()); in populateTabStrip()

123456