Skip to content

Commit

Permalink
Change in mEmptyView and news_list_view
Browse files Browse the repository at this point in the history
  • Loading branch information
mirushka committed Jul 14, 2017
1 parent 73a92d0 commit 0daf85c
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NewsApp/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
Expand Down
Binary file added NewsApp/app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa
NewsAdapter mAdapter;

//ListView
ListView listView;
ListView news_list_view;

// TextView that is visible when there is a problem with the connection or the query
TextView mEmptyView;
Expand All @@ -57,9 +57,11 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

// Setting the launch screen view
news_list_view = (ListView) findViewById(R.id.list_view);
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.search_field);
linearLayout.setVisibility(View.GONE);
Button searchButton = (Button) findViewById(R.id.button_FirstSearch);
mEmptyView = (TextView) findViewById(R.id.empty_text_view);

//Set ClickListener on Search Button Click
searchButton.setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -220,7 +222,7 @@ public void onItemClick(AdapterView<?> adapterView, View view, int position, lon
@Override
public void onLoaderReset(Loader<ArrayList<News>> loader) {
mAdapter.clear();
listView.setVisibility(View.GONE);
news_list_view.setVisibility(View.GONE);
}

}
Expand Down
Binary file added NewsApp/app/src/main/news-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NewsApp/app/src/main/newsSearch-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion NewsApp/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_marginBottom="@dimen/margin_big"
android:layout_marginTop="@dimen/margin_big"
android:adjustViewBounds="true"
android:src="@drawable/news" />
android:src="@drawable/newssearch" />

<LinearLayout
android:layout_width="match_parent"
Expand Down
3 changes: 1 addition & 2 deletions NewsApp/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
<string name="hint">Enter topic</string>
<string name="no_books_found">No article found.</string>
<string name="Title">title</string>
<string name="no_connection">There is no internet connection.</string>
<string name="no_news_found">No news found.</string>
<string name="no_internet">No internet</string>
<string name="no_internet">There is no internet connection.</string>
<string name="search_you_queried">Searched: </string>
<string name="search_title">Search</string>
</resources>

0 comments on commit 0daf85c

Please sign in to comment.