For example, we have a file in our raw folder app/src/main/res/raw/sample_teas.json. To get an InputStream for reading it, from out Context context, we can do this:
A.
InputStream input = context.openRawResource(R.raw.sample_teas);
B.
InputStream input = context.getRawResource(R.raw.sample_teas);
C.
InputStream input = context.getResources().openRawResource(R.raw.sample_teas);
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Comments