Android Resources.NotFoundException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Resources.NotFoundException class.

This code example shows how to use the following methods:getMessage, printStackTrace
				this.loadWordCommentsUrl(wordID);
			else if (serviceName.equals(ServicesNames.SEARCH_SERVICE))
				this.loadSearch(firstLetterOrSearch);
		} 
		catch (NotFoundException e) {
			e.printStackTrace();
			Log.d("Sync", "Synchronizing error - " + e.getMessage());
			mDelegate.onSyncError(e);
		} 
		catch (MalformedURLException e) {
			Log.d("Sync", "Synchronizing error - " + e.getMessage());
			e.printStackTrace();
			mDelegate.onSyncError(e);
		} 
		catch (UnsupportedEncodingException e) {
			Log.d("Sync", "Synchronizing error - " + e.getMessage());
			e.printStackTrace();
			mDelegate.onSyncError(e);
		}		 
	} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage, printStackTrace
				this.loadSearchJobsUrl();
			else if (serviceName.equals(ServicesNames.SEARCHPEOPLE_SERVICE))
				this.loadSearchPeopleUrl();
		} 
		catch (NotFoundException e) {
			e.printStackTrace();
			Log.d("Sync", "Synchronizing error - " + e.getMessage());
			mDelegate.onSyncError(e);
		} 
		catch (MalformedURLException e) {
			Log.d("Sync", "Synchronizing error - " + e.getMessage());
			e.printStackTrace();
			mDelegate.onSyncError(e);
		} 
	} 
 
	public void GetNewestOffers() { 
		db = dbModel.getWritableDatabase();
		db.execSQL("PRAGMA foreign_keys = ON;");
		Log.d("Sync", "GetNewestOffers ... ");
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
    JapaneseKeyboardParser parser = new JapaneseKeyboardParser(
        resources, resources.getXml(spec.getXmlLayoutResourceId()), spec, width, height);
    try { 
      return parser.parseKeyboard();
    } catch (NotFoundException e) {
      fail(e.getMessage());
    } catch (XmlPullParserException e) {
      fail(e.getMessage());
    } catch (IOException e) {
      fail(e.getMessage());
    } 
 
    throw new AssertionError("Should never reach here");
  } 
 
  @SmallTest 
  public void testFlick() { 
    JapaneseKeyboardView view = new JapaneseKeyboardView(getInstrumentation().getTargetContext());
    Activity activity = launchActivity(
        getInstrumentation().getTargetContext().getPackageName(), Activity.class, null);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		try { 
			openHelper = new DatabaseHelper(this.getContext(),TABLE_NAME);
			return true; 
		} catch (NotFoundException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
		return false; 
	} 
	 
 
	@Override 
	public String getType(Uri uri) {
		 return null; 
	} 
 
	@Override 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
		} catch (ParserConfigurationException e) {
			Logger.log(e.getMessage());
		} catch (SAXException e) {
			Logger.log(e.getMessage());
		} catch (NotFoundException e) {
			Logger.log(e.getMessage());
		} catch (IOException e) {
			Logger.log(e.getMessage());
		} 
		return lineItems;
	} 
	private int getResourceId() { 
		return listofLinesActivity.getResources().getIdentifier(
				PersistentHandler.get(listofLinesActivity)	+ Constants.XMLAttributes.LINES_POSTFIX,
				Constants.XMLAttributes.XML_FOLDER,  
				listofLinesActivity.getPackageName());
	} 
	@Override 
	protected void onPostExecute(ArrayList<LineItem> result) {
		listofLinesActivity.getAdapter().setModel(result);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
		} catch (ParserConfigurationException e) {
			Logger.log(e.getMessage());
		} catch (SAXException e) {
			Logger.log(e.getMessage());
		} catch (NotFoundException e) {
			Logger.log(e.getMessage());
		} catch (IOException e) {
			Logger.log(e.getMessage());
		} 
		return lindeDetails;
	} 
 
	private int getResourceId() { 
		return busLineActivity.getResources().getIdentifier(
			busLine.getCityName()+busLine.getLineName().toLowerCase(),
			Constants.XMLAttributes.XML_FOLDER,  
			busLineActivity.getPackageName());
	} 
 
	@Override 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
	 */ 
	public C parse(int resourceId, Class<C> clazz) throws XmResourceReaderResourcesNotFoundException, XmlReaderParsingException {
		try { 
			return super.parse( resources.openRawResource(resourceId), clazz);
		} catch (NotFoundException e) {			
			e.printStackTrace();
			throw new XmResourceReaderResourcesNotFoundException(resources.getResourceName(resourceId) + " not found in /raw");
		} 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        final TypedValue typedValue = new TypedValue(); // create a new typed value to received the resolved attribute
                                                        // value 
        final DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
        if (!theme.resolveAttribute(resId, typedValue, true)) // if we can't resolve the value
        { 
            throw new NotFoundException("Resource ID #0x" + Integer.toHexString(resId));
        } 
        if (typedValue.type != TypedValue.TYPE_DIMENSION) // if the value isn't of the correct type
        { 
            throw new NotFoundException("Resource ID #0x" + Integer.toHexString(resId) + " type #0x"
                    + Integer.toHexString(typedValue.type) + " is not valid");
        } 
        return typedValue.getDimension(displayMetrics); // return the value of the attribute in terms of the display
    } 
 
    /** 
     * Returns the list preferred item height theme attribute as a dimension of the display. 
     *  
     * @param context 
     *            The current context. 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
		} catch (ParserConfigurationException e) {
			Logger.log(e.getMessage());
		} catch (SAXException e) {
			Logger.log(e.getMessage());
		} catch (NotFoundException e) {
			Logger.log(e.getMessage());
		} catch (IOException e) {
			Logger.log(e.getMessage());
		} 
		return lineItems;
	} 
	private int getResourceId() { 
		return listofLinesActivity.getResources().getIdentifier(
				PersistentHandler.get(listofLinesActivity)	+ Constants.XMLAttributes.LINES_POSTFIX,
				Constants.XMLAttributes.XML_FOLDER,  
				listofLinesActivity.getPackageName());
	} 
	@Override 
	protected void onPostExecute(ArrayList<LineItem> result) {
		listofLinesActivity.getAdapter().setModel(result);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:toString
		if (object == null) {
			try { 
				object = resources.getDrawable(iconId);
			} catch (NotFoundException e) {
				Logger.warnning("getDrawable() failure: %s [resId: %d]", 
						e.toString(), iconId);
				 
				object = null;
			} 
		} 
		 
		if (object instanceof Drawable == false) {
			return resources.getDrawable(iconId);
		} 
 
        return ((Drawable)object);
    } 
 
    public Drawable getFullResIcon(Context context,
    		String packageName, int iconId) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android Resources.NotFoundException Questions & Answers:

See Code Examples for Android Resources.NotFoundException Methods: