├── android-L-preview
├── AndroidManifest.xml
├── proguard-project.txt
├── res
│ ├── layout
│ │ └── activity_main.xml
│ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── L
│ └── MainActivity.java
├── android-actionbar-for-2.x.x
├── .classpath
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── ic_action_search.png
│ │ ├── ic_content_copy.png
│ │ ├── ic_launcher.png
│ │ └── ic_social_share.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ ├── values-sw600dp
│ │ └── dimens.xml
│ ├── values-sw720dp-land
│ │ └── dimens.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-camera-app
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-canvas-donut-chart
├── AndroidManifest.xml
├── res
│ ├── layout
│ │ └── activity_main.xml
│ └── values
│ │ ├── attrs.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── views
│ ├── DonutChart.java
│ └── MainActivity.java
├── android-clean-http-async-task
├── AndroidManifest.xml
├── hmkcode-http-lib.jar
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ ├── MainActivity.java
│ └── http
│ ├── AsyncHttpTask.java
│ └── HttpHandler.java
├── android-connectivity
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ └── connectivity
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── build.gradle
├── android-custom-listview
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ └── row.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ ├── Item.java
│ ├── MainActivity.java
│ └── MyAdapter.java
├── android-custom-view
├── AndroidManifest.xml
├── res
│ ├── layout
│ │ └── activity_main.xml
│ └── values
│ │ ├── attrs.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── views
│ ├── MainActivity.java
│ └── SimpleView.java
├── android-draw-happy-face
├── AndroidManifest.xml
├── res
│ ├── drawable-hdpi
│ │ ├── ic_launcher.png
│ │ └── woodgraybg.jpg
│ ├── layout
│ │ └── activity_main.xml
│ └── values
│ │ ├── attrs.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── drawing
│ ├── FaceView.java
│ ├── MainActivity.java
│ └── shapes
│ └── Face.java
├── android-gcm-client
├── AndroidManifest.xml
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── gcm
│ ├── GcmBroadcastReceiver.java
│ ├── GcmMessageHandler.java
│ └── MainActivity.java
├── android-get-current-location
├── AndroidManifest.xml
├── res
│ └── layout
│ │ └── activity_main.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── location
│ └── MainActivity.java
├── android-get-last-location-fused-api
├── AndroidManifest.xml
├── res
│ └── layout
│ │ └── activity_main.xml
└── src
│ └── com
│ └── hmkcode
│ └── locations
│ └── MainActivity.java
├── android-http-client
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-http-get-json
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-http
├── build.gradle
├── http-asynctask
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ └── http
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── http-coroutine
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ └── http
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── post-json
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── hmkcode
│ │ └── MainActivity.kt
│ └── res
│ ├── drawable
│ └── ic_launcher_background.xml
│ ├── layout
│ └── activity_main.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── android-input-text-layout
├── AndroidManifest.xml
├── project.properties
├── res
│ └── layout
│ │ └── activity_main.xml
└── src
│ └── com
│ └── hmkcode
│ └── inputtextlayout
│ └── MainActivity.java
├── android-material-design-appcompat
├── AndroidManifest.xml
├── res
│ ├── drawable-hdpi
│ │ ├── cardview_border.xml
│ │ ├── ic_action_location_found.png
│ │ ├── ic_action_location_found_dark.png
│ │ ├── ic_launcher.png
│ │ └── ic_menu.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ ├── activity_main_1.xml
│ │ ├── activity_main_2.xml
│ │ ├── activity_main_3.xml
│ │ ├── activity_main_4.xml
│ │ ├── activity_main_5.xml
│ │ ├── activity_main_6.xml
│ │ ├── cardviews.xml
│ │ └── nav_header.xml
│ ├── menu
│ │ ├── main.xml
│ │ └── navigation_drawer_items.xml
│ ├── values-v21
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── app
│ └── MainActivity.java
├── android-menu-events-change
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── ic_content_new.png
│ │ ├── ic_content_remove.png
│ │ ├── ic_launcher.png
│ │ └── ic_location_web_site.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ ├── values-sw600dp
│ │ └── dimens.xml
│ ├── values-sw720dp-land
│ │ └── dimens.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-navigation-drawer
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── drawer_shadow.9.png
│ │ ├── ic_action_search.png
│ │ ├── ic_drawer.png
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ └── drawer_listview_item.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-options-menu
├── .classpath
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── ic_action_search.png
│ │ ├── ic_content_copy.png
│ │ ├── ic_launcher.png
│ │ └── ic_social_share.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ └── strings.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── MainActivity.java
├── android-post-json
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── readme.md
└── settings.gradle
├── android-pro-listview
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── action_help.png
│ │ ├── action_help_32.png
│ │ ├── action_search.png
│ │ ├── action_search_32.png
│ │ ├── collections_cloud.png
│ │ ├── collections_cloud_32.png
│ │ ├── content_save.png
│ │ ├── ic_launcher.png
│ │ ├── location_place.png
│ │ ├── rectangle.xml
│ │ └── social_share.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ ├── group_header_item.xml
│ │ └── target_item.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ ├── MainActivity.java
│ ├── Model.java
│ └── MyAdapter.java
├── android-read-browser-bookmark
├── AndroidManifest.xml
├── res
│ └── layout
│ │ ├── activity_main.xml
│ │ └── link.xml
└── src
│ └── com
│ └── hmkcode
│ └── browser
│ └── bookmark
│ ├── MainActivity.java
│ └── MyCursorAdapter.java
├── android-recyclerview
├── README.md
├── app-kotlin
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ ├── activities
│ │ │ └── MainActivity.kt
│ │ │ ├── adapters
│ │ │ └── MyAdapter.kt
│ │ │ └── model
│ │ │ └── Link.kt
│ │ └── res
│ │ ├── drawable
│ │ ├── ic_github.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_link.xml
│ │ ├── ic_twitter.xml
│ │ └── item_border.xml
│ │ └── layout
│ │ ├── activity_main.xml
│ │ └── item_layout.xml
├── app-listadapter
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ ├── activities
│ │ │ └── MainActivity.java
│ │ │ ├── adapters
│ │ │ └── MyListAdapter.java
│ │ │ ├── listeners
│ │ │ └── MyItemClickListener.java
│ │ │ ├── models
│ │ │ └── Link.java
│ │ │ └── utils
│ │ │ └── LinkDiffCallback.java
│ │ └── res
│ │ ├── drawable
│ │ ├── ic_github.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_link.xml
│ │ ├── ic_twitter.xml
│ │ └── item_border.xml
│ │ └── layout
│ │ ├── activity_main.xml
│ │ └── item_layout.xml
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ ├── activities
│ │ │ └── MainActivity.java
│ │ │ ├── adapters
│ │ │ └── MyAdapter.java
│ │ │ └── model
│ │ │ └── Link.java
│ │ └── res
│ │ ├── drawable
│ │ ├── ic_github.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_link.xml
│ │ ├── ic_twitter.xml
│ │ └── item_border.xml
│ │ └── layout
│ │ ├── activity_main.xml
│ │ └── item_layout.xml
├── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── android-show-image-and-path
├── AndroidManifest.xml
├── libs
│ └── android-support-v4.jar
├── res
│ └── layout
│ │ └── activity_main.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── image
│ ├── MainActivity.java
│ └── RealPathUtil.java
├── android-sign-in-up-screen
├── AndroidManifest.xml
├── res
│ ├── drawable-hdpi
│ │ ├── balloon_bg.png
│ │ ├── button_default_bg.xml
│ │ ├── edittext_bottom_bg.xml
│ │ ├── edittext_default_bg.xml
│ │ ├── edittext_top_bg.xml
│ │ ├── email.png
│ │ ├── ic_launcher.png
│ │ ├── linearlayout_bg.xml
│ │ ├── password.png
│ │ └── user.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ ├── activity_sign_in_screen.xml
│ │ └── activity_sign_up_screen.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── sign
│ ├── MainActivity.java
│ ├── SignInActivity.java
│ └── SignUpActivity.java
├── android-social-signin
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ ├── balloon_bg.png
│ │ ├── button_fb_bg.xml
│ │ ├── button_gplus_bg.xml
│ │ ├── button_twitter_bg.xml
│ │ ├── ic_launcher.png
│ │ ├── icon_fb.png
│ │ ├── icon_gplus.png
│ │ ├── icon_twitter.png
│ │ ├── layers_fb_button_bg.xml
│ │ ├── layers_gplus_button_bg.xml
│ │ ├── layers_twitter_button_bg.xml
│ │ └── linearlayout_bg.xml
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ └── signin
│ └── MainActivity.java
├── android-sqlite
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ ├── MainActivity.java
│ ├── model
│ └── Book.java
│ └── sqlite
│ └── MySQLiteHelper.java
├── android-start-activity
├── AndroidManifest.xml
├── ic_launcher-web.png
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_another.xml
│ │ └── activity_main.xml
│ ├── menu
│ │ └── main.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── hmkcode
│ └── android
│ ├── AnotherActivity.java
│ └── MainActivity.java
├── android-swipe-views-tabs
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hmkcode
│ │ │ ├── MainActivity.java
│ │ │ ├── adapters
│ │ │ └── MyFragmentPagerAdapter.java
│ │ │ └── fragments
│ │ │ ├── FirstFragment.java
│ │ │ └── SecondFragment.java
│ │ └── res
│ │ └── layout
│ │ ├── activity_main.xml
│ │ ├── fragment_first.xml
│ │ └── fragment_second.xml
└── build.gradle
├── android-whatsapp-profile-screen
└── res
│ ├── drawable-hdpi
│ ├── balloon.png
│ ├── edit_states.xml
│ ├── ic_action_edit.png
│ ├── ic_action_new_event.png
│ ├── ic_launcher.png
│ ├── image_border.xml
│ ├── image_state.xml
│ └── textview_border.xml
│ └── layout
│ └── activity_main.xml
├── intent-action-send
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── hmkcode
│ │ └── intent_action_send
│ │ ├── MainActivity.kt
│ │ └── ReceivingActivity.kt
│ └── res
│ └── layout
│ ├── activity_main.xml
│ └── activity_receiving.xml
├── java-post-gcm
├── .classpath
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── hmkcode
│ │ ├── App.java
│ │ ├── POST2GCM.java
│ │ └── vo
│ │ └── Content.java
│ └── test
│ └── java
│ └── com
│ └── hmkcode
│ └── AppTest.java
└── readme.md
/android-L-preview/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-L-preview/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/android-L-preview/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-L-preview/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | L Preview
5 | MainActivity
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-L-preview/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/android-L-preview/src/com/hmkcode/android/L/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.L;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 |
6 |
7 | public class MainActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_content_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_content_copy.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_social_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-hdpi/ic_social_share.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-actionbar-for-2.x.x/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 | Hello world!
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-actionbar-for-2.x.x/src/com/hmkcode/android/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.view.Menu;
6 |
7 | public class MainActivity extends ActionBarActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 | }
14 |
15 | @Override
16 | public boolean onCreateOptionsMenu(Menu menu) {
17 | // Inflate the menu; this adds items to the action bar if it is present.
18 | getMenuInflater().inflate(R.menu.main, menu);
19 | return true;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/android-camera-app/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android-camera-app/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-camera-app/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-camera-app/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-camera-app/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-camera-app/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-camera-app/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-camera-app/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Camera App
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-camera-app/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Donut Chart
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-canvas-donut-chart/src/com/hmkcode/views/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.views;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 |
6 |
7 | public class MainActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/hmkcode-http-lib.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-clean-http-async-task/hmkcode-http-lib.jar
--------------------------------------------------------------------------------
/android-clean-http-async-task/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-clean-http-async-task/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-clean-http-async-task/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
24 |
25 |
30 |
31 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Clean HTTP AsyncTask
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-clean-http-async-task/src/com/hmkcode/http/HttpHandler.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.http;
2 |
3 | import org.apache.http.client.methods.HttpUriRequest;
4 |
5 | import com.hmkcode.http.AsyncHttpTask;
6 |
7 | public abstract class HttpHandler {
8 |
9 | public abstract HttpUriRequest getHttpRequestMethod();
10 |
11 | public abstract void onResponse(String result);
12 |
13 | public void execute(){
14 | new AsyncHttpTask(this).execute();
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/android-connectivity/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android-connectivity/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
--------------------------------------------------------------------------------
/android-connectivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/android-connectivity/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | connectivity
3 |
4 |
--------------------------------------------------------------------------------
/android-connectivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-connectivity/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.50'
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.5.1'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 |
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/android-custom-listview/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-custom-listview/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-custom-listview/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-custom-listview/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-custom-listview/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-custom-listview/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android-custom-listview/res/layout/row.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
16 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android-custom-listview/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-custom-listview/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-custom-listview/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-custom-listview/src/com/hmkcode/android/Item.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | public class Item {
4 |
5 | private String title;
6 | private String description;
7 |
8 |
9 | public Item(String title, String description) {
10 | super();
11 | this.title = title;
12 | this.description = description;
13 | }
14 | public String getTitle() {
15 | return title;
16 | }
17 | public void setTitle(String title) {
18 | this.title = title;
19 | }
20 | public String getDescription() {
21 | return description;
22 | }
23 | public void setDescription(String description) {
24 | this.description = description;
25 | }
26 |
27 |
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/android-custom-listview/src/com/hmkcode/android/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import java.util.ArrayList;
4 |
5 | import android.app.Activity;
6 | import android.app.ListActivity;
7 | import android.os.Bundle;
8 | import android.widget.ListView;
9 |
10 | public class MainActivity extends ListActivity {
11 |
12 |
13 | public void onCreate(Bundle icicle) {
14 | super.onCreate(icicle);
15 |
16 | // if extending Activity
17 | //setContentView(R.layout.activity_main);
18 |
19 | // 1. pass context and data to the custom adapter
20 | MyAdapter adapter = new MyAdapter(this, generateData());
21 |
22 | // if extending Activity 2. Get ListView from activity_main.xml
23 | //ListView listView = (ListView) findViewById(R.id.listview);
24 |
25 | // 3. setListAdapter
26 | //listView.setAdapter(adapter); if extending Activity
27 | setListAdapter(adapter);
28 | }
29 |
30 |
31 | private ArrayList- generateData(){
32 | ArrayList
- items = new ArrayList
- ();
33 | items.add(new Item("Item 1","First Item on the list"));
34 | items.add(new Item("Item 2","Second Item on the list"));
35 | items.add(new Item("Item 3","Third Item on the list"));
36 |
37 | return items;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/android-custom-view/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-custom-view/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-custom-view/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-custom-view/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Simple Custom View
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-custom-view/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-custom-view/src/com/hmkcode/views/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.views;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.view.View.OnClickListener;
7 | import android.widget.TextView;
8 |
9 |
10 | public class MainActivity extends Activity implements OnClickListener {
11 |
12 | SimpleView svCircle;
13 | SimpleView svSquare;
14 | TextView tv;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_main);
20 |
21 | svCircle = (SimpleView) findViewById(R.id.simpleViewCircle);
22 | svSquare = (SimpleView) findViewById(R.id.simpleViewSquare);
23 | tv = (TextView) findViewById(R.id.tv);
24 |
25 | svCircle.setOnClickListener(this);
26 | svSquare.setOnClickListener(this);
27 |
28 | }
29 |
30 |
31 | @Override
32 | public void onClick(View view) {
33 |
34 | switch(view.getId()){
35 | case R.id.simpleViewCircle:
36 | tv.setText("Circle");
37 | break;
38 | case R.id.simpleViewSquare:
39 | tv.setText("Square");
40 | break;
41 |
42 | }
43 |
44 | }
45 |
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/android-draw-happy-face/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 | e
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-draw-happy-face/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-draw-happy-face/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-draw-happy-face/res/drawable-hdpi/woodgraybg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-draw-happy-face/res/drawable-hdpi/woodgraybg.jpg
--------------------------------------------------------------------------------
/android-draw-happy-face/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android-draw-happy-face/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-draw-happy-face/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-draw-happy-face/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DrawFace
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-draw-happy-face/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-draw-happy-face/src/com/hmkcode/drawing/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.drawing;
2 |
3 |
4 | import android.app.Activity;
5 |
6 | public class MainActivity extends Activity {
7 |
8 | protected void onCreate(android.os.Bundle savedInstanceState) {
9 | super.onCreate(savedInstanceState);
10 | setContentView(R.layout.activity_main);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/android-gcm-client/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-gcm-client/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-gcm-client/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/android-gcm-client/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-gcm-client/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-gcm-client/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Android GCM
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-gcm-client/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-gcm-client/src/com/hmkcode/android/gcm/GcmBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.gcm;
2 |
3 | import android.app.Activity;
4 | import android.content.ComponentName;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.support.v4.content.WakefulBroadcastReceiver;
8 |
9 | public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
10 |
11 |
12 | @Override
13 | public void onReceive(Context context, Intent intent) {
14 |
15 | // Explicitly specify that GcmMessageHandler will handle the intent.
16 | ComponentName comp = new ComponentName(context.getPackageName(),
17 | GcmMessageHandler.class.getName());
18 |
19 | // Start the service, keeping the device awake while it is launching.
20 | startWakefulService(context, (intent.setComponent(comp)));
21 | setResultCode(Activity.RESULT_OK);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/android-get-current-location/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/android-get-current-location/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/android-get-last-location-fused-api/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android-get-last-location-fused-api/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android-http-client/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android-http-client/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-http-client/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-http-client/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-http-client/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-http-client/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/android-http-client/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-http-client/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-http-client/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HTTP APP
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-http-client/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-http-get-json/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/android-http-get-json/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-http-get-json/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-http-get-json/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-http-get-json/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-http-get-json/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/android-http-get-json/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-http-get-json/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-http-get-json/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HTTP GET JSON APP
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-http-get-json/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-http/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.50'
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.5.1'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 |
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 29
9 | buildToolsVersion "29.0.2"
10 | defaultConfig {
11 | applicationId "com.hmkcode.http"
12 | minSdkVersion 19
13 | targetSdkVersion 29
14 | versionCode 1
15 | versionName "1.0"
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
29 | implementation 'androidx.appcompat:appcompat:1.0.2'
30 | implementation 'androidx.core:core-ktx:1.0.2'
31 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
32 | testImplementation 'junit:junit:4.12'
33 | androidTestImplementation 'androidx.test:runner:1.1.1'
34 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
35 | }
36 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | android-http
3 |
4 |
--------------------------------------------------------------------------------
/android-http/http-asynctask/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-http/http-coroutine/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android-http/http-coroutine/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/android-http/http-coroutine/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/android-http/http-coroutine/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | android-http
3 |
4 |
5 | Hello blank fragment
6 |
7 |
--------------------------------------------------------------------------------
/android-http/http-coroutine/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-http/post-json/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android-http/post-json/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/android-http/post-json/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
--------------------------------------------------------------------------------
/android-http/post-json/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | post-json
3 |
4 |
--------------------------------------------------------------------------------
/android-http/post-json/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-input-text-layout/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-input-text-layout/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-22
15 | android.library.reference.1=..\\..\\sdk\\extras\\android\\support\\design
16 | android.library.reference.2=../../sdk/extras/android/support/v7/appcompat
17 |
--------------------------------------------------------------------------------
/android-input-text-layout/src/com/hmkcode/inputtextlayout/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.inputtextlayout;
2 |
3 | import android.support.v7.app.ActionBarActivity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 |
8 | public class MainActivity extends ActionBarActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_main);
14 | }
15 |
16 | @Override
17 | public boolean onCreateOptionsMenu(Menu menu) {
18 | // Inflate the menu; this adds items to the action bar if it is present.
19 | getMenuInflater().inflate(R.menu.main, menu);
20 | return true;
21 | }
22 |
23 | @Override
24 | public boolean onOptionsItemSelected(MenuItem item) {
25 | // Handle action bar item clicks here. The action bar will
26 | // automatically handle clicks on the Home/Up button, so long
27 | // as you specify a parent activity in AndroidManifest.xml.
28 | int id = item.getItemId();
29 | if (id == R.id.action_settings) {
30 | return true;
31 | }
32 | return super.onOptionsItemSelected(item);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/drawable-hdpi/cardview_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/drawable-hdpi/ic_action_location_found.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-material-design-appcompat/res/drawable-hdpi/ic_action_location_found.png
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/drawable-hdpi/ic_action_location_found_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-material-design-appcompat/res/drawable-hdpi/ic_action_location_found_dark.png
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-material-design-appcompat/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/drawable-hdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-material-design-appcompat/res/drawable-hdpi/ic_menu.png
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/layout/activity_main_1.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/layout/activity_main_2.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
15 |
16 |
17 |
27 |
28 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/layout/nav_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/menu/navigation_drawer_items.xml:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFF5F5F5
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values-v21/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values-v21/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HMKCODE App
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #CC000000
4 |
5 |
6 | #ED1C24
7 | #CC0000
8 | #B3E5FC
9 | #ED1C24
10 | #ffffff
11 | #ffffff
12 | #FFFFFF
13 | #B6B6B6
14 |
15 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 | 16dp
7 | 256dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HMKCODE App
5 | Hello world!
6 | Settings
7 | Find
8 |
9 | Android 5.0 Lollipop was one of the most significant Android releases ever,
10 | in no small part due to the introduction of material design,
11 | a new design language that refreshed the entire Android experience
12 |
13 |
14 | Open navigation drawer
15 | Close navigation drawer
16 |
17 |
18 |
--------------------------------------------------------------------------------
/android-material-design-appcompat/src/com/hmkcode/app/MainActivity.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-material-design-appcompat/src/com/hmkcode/app/MainActivity.java
--------------------------------------------------------------------------------
/android-menu-events-change/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-menu-events-change/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-hdpi/ic_content_new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-hdpi/ic_content_new.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-hdpi/ic_content_remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-hdpi/ic_content_remove.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-hdpi/ic_location_web_site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-hdpi/ic_location_web_site.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-menu-events-change/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-menu-events-change/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 | Hello world!
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-menu-events-change/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-navigation-drawer/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-navigation-drawer/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-navigation-drawer/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-navigation-drawer/res/drawable-hdpi/drawer_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-navigation-drawer/res/drawable-hdpi/drawer_shadow.9.png
--------------------------------------------------------------------------------
/android-navigation-drawer/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-navigation-drawer/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/android-navigation-drawer/res/drawable-hdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-navigation-drawer/res/drawable-hdpi/ic_drawer.png
--------------------------------------------------------------------------------
/android-navigation-drawer/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-navigation-drawer/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-navigation-drawer/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
26 |
27 |
--------------------------------------------------------------------------------
/android-navigation-drawer/res/layout/drawer_listview_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android-navigation-drawer/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/android-navigation-drawer/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-navigation-drawer/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 | Settings
6 | Hello world!
7 |
8 |
9 |
- Item 1
10 | - Item 2
11 | - Item 3
12 | - Item 4
13 | - Item 5
14 | - Item 6
15 |
16 |
17 | Open navigation drawer
18 | Close navigation drawer
19 |
20 |
--------------------------------------------------------------------------------
/android-navigation-drawer/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-options-menu/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android-options-menu/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-options-menu/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-options-menu/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-options-menu/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-options-menu/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/android-options-menu/res/drawable-hdpi/ic_content_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-options-menu/res/drawable-hdpi/ic_content_copy.png
--------------------------------------------------------------------------------
/android-options-menu/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-options-menu/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-options-menu/res/drawable-hdpi/ic_social_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-options-menu/res/drawable-hdpi/ic_social_share.png
--------------------------------------------------------------------------------
/android-options-menu/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android-options-menu/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android-options-menu/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 |
6 | Search
7 | Copy
8 | Share
9 |
10 | Hello world!
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-options-menu/src/com/hmkcode/android/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.view.Menu;
6 |
7 | public class MainActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 | }
14 |
15 | @Override
16 | public boolean onCreateOptionsMenu(Menu menu) {
17 | // Inflate the menu; this adds items to the action bar if it is present.
18 | getMenuInflater().inflate(R.menu.main, menu);
19 | return true;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/android-post-json/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | defaultConfig {
6 | applicationId "com.hmkcode"
7 | minSdkVersion 16
8 | targetSdkVersion 27
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'com.android.support:appcompat-v7:27.1.1'
24 | implementation 'com.android.support:design:27.1.1'
25 | implementation 'com.android.support.constraint:constraint-layout:1.1.2'
26 | testImplementation 'junit:junit:4.12'
27 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
28 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
29 | }
30 |
--------------------------------------------------------------------------------
/android-post-json/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android-post-json/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/android-post-json/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
--------------------------------------------------------------------------------
/android-post-json/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | android-post-json
3 |
4 |
--------------------------------------------------------------------------------
/android-post-json/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android-post-json/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.1.4'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/android-post-json/readme.md:
--------------------------------------------------------------------------------
1 | [For the updated code click here!](https://github.com/hmkcode/Android/tree/master/android-http/post-json)
2 |
3 |
--------------------------------------------------------------------------------
/android-post-json/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/android-pro-listview/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-pro-listview/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/action_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/action_help.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/action_help_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/action_help_32.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/action_search.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/action_search_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/action_search_32.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/collections_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/collections_cloud.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/collections_cloud_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/collections_cloud_32.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/content_save.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/location_place.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/location_place.png
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/rectangle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android-pro-listview/res/drawable-hdpi/social_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-pro-listview/res/drawable-hdpi/social_share.png
--------------------------------------------------------------------------------
/android-pro-listview/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android-pro-listview/res/layout/group_header_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-pro-listview/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-pro-listview/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-pro-listview/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Advanced ListView
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-pro-listview/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-pro-listview/src/com/hmkcode/android/Model.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | public class Model {
4 |
5 | private int icon;
6 | private String title;
7 | private String counter;
8 |
9 | private boolean isGroupHeader = false;
10 |
11 | public Model(String title) {
12 | this(-1,title,null);
13 | isGroupHeader = true;
14 | }
15 | public Model(int icon, String title, String counter) {
16 | super();
17 | this.icon = icon;
18 | this.title = title;
19 | this.counter = counter;
20 | }
21 | public int getIcon() {
22 | return icon;
23 | }
24 | public void setIcon(int icon) {
25 | this.icon = icon;
26 | }
27 | public String getTitle() {
28 | return title;
29 | }
30 | public void setTitle(String title) {
31 | this.title = title;
32 | }
33 | public String getCounter() {
34 | return counter;
35 | }
36 | public void setCounter(String counter) {
37 | this.counter = counter;
38 | }
39 | public boolean isGroupHeader() {
40 | return isGroupHeader;
41 | }
42 | public void setGroupHeader(boolean isGroupHeader) {
43 | this.isGroupHeader = isGroupHeader;
44 | }
45 |
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/android-read-browser-bookmark/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/android-read-browser-bookmark/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android-read-browser-bookmark/src/com/hmkcode/browser/bookmark/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.browser.bookmark;
2 |
3 | import android.app.Activity;
4 | import android.database.Cursor;
5 | import android.os.Bundle;
6 | import android.provider.Browser;
7 |
8 | import android.widget.ListView;
9 |
10 | public class MainActivity extends Activity {
11 |
12 | ListView listView;
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_main);
17 | listView = (ListView) findViewById(R.id.listView1);
18 | getBrowserHist();
19 | }
20 |
21 | public void getBrowserHist() {
22 |
23 | Cursor cursor = getContentResolver().query(Browser.BOOKMARKS_URI, null, null, null, null);
24 |
25 | // Cursor cursor = getContentResolver().query(Browser.SEARCHES_URI, null, null, null, null);
26 |
27 | MyCursorAdapter myCursorAdapter = new MyCursorAdapter(this,cursor,0);
28 | listView.setAdapter(myCursorAdapter);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/java/com/hmkcode/model/Link.kt:
--------------------------------------------------------------------------------
1 | package com.hmkcode.model
2 |
3 | class Link {
4 |
5 | var icon: Int = 0
6 | var title: String? = null
7 | var url: String? = null
8 | }
9 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/res/drawable/ic_github.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/res/drawable/ic_link.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/res/drawable/item_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/app-kotlin/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 |
6 |
7 |
8 | defaultConfig {
9 | applicationId "com.hmkcode"
10 | minSdkVersion 19
11 | targetSdkVersion 28
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | compileOptions {
27 | targetCompatibility 1.8
28 | sourceCompatibility 1.8
29 | }
30 | }
31 |
32 | dependencies {
33 | implementation fileTree(dir: 'libs', include: ['*.jar'])
34 |
35 | implementation 'com.android.support:appcompat-v7:28.0.0'
36 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
37 | testImplementation 'junit:junit:4.12'
38 | implementation 'com.android.support:recyclerview-v7:28.0.0'
39 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
40 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
41 | }
42 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/java/com/hmkcode/listeners/MyItemClickListener.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.listeners;
2 |
3 | import com.hmkcode.models.Link;
4 |
5 | @FunctionalInterface
6 | public interface MyItemClickListener {
7 | public void onClick(Link link);
8 | }
9 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/java/com/hmkcode/models/Link.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.models;
2 |
3 | public class Link {
4 |
5 | private int icon;
6 | private String title;
7 | private String url;
8 |
9 | public int getIcon() {
10 | return icon;
11 | }
12 |
13 | public void setIcon(int icon) {
14 | this.icon = icon;
15 | }
16 |
17 | public String getTitle() {
18 | return title;
19 | }
20 |
21 | public void setTitle(String title) {
22 | this.title = title;
23 | }
24 |
25 | public String getUrl() {
26 | return url;
27 | }
28 |
29 | public void setUrl(String url) {
30 | this.url = url;
31 | }
32 |
33 | @Override
34 | public boolean equals(Object obj) {
35 | return this.getUrl().equals(((Link)obj).getUrl());
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return "Link{" +
41 | "icon=" + icon +
42 | ", title='" + title + '\'' +
43 | ", url='" + url + '\'' +
44 | '}';
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/java/com/hmkcode/utils/LinkDiffCallback.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.utils;
2 |
3 | import android.support.v7.util.DiffUtil;
4 | import com.hmkcode.models.Link;
5 |
6 | public class LinkDiffCallback extends DiffUtil.ItemCallback {
7 | @Override
8 | public boolean areItemsTheSame(Link oldItem, Link newItem) {
9 | return oldItem.getUrl().equals(newItem.getUrl());
10 | }
11 |
12 | @Override
13 | public boolean areContentsTheSame(Link oldItem, Link newItem) {
14 | return oldItem.getUrl().equals(newItem.getUrl());
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/res/drawable/ic_github.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/res/drawable/ic_link.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/res/drawable/item_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/app-listadapter/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 28
9 | defaultConfig {
10 | applicationId "com.hmkcode"
11 | minSdkVersion 19
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28 | implementation 'com.android.support:appcompat-v7:28.0.0'
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | implementation 'com.android.support:recyclerview-v7:28.0.0'
31 | testImplementation 'junit:junit:4.12'
32 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
33 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
34 | }
35 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/java/com/hmkcode/model/Link.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.model;
2 |
3 | public class Link {
4 |
5 | private int icon;
6 | private String title;
7 | private String url;
8 |
9 | public int getIcon() {
10 | return icon;
11 | }
12 |
13 | public void setIcon(int icon) {
14 | this.icon = icon;
15 | }
16 |
17 | public String getTitle() {
18 | return title;
19 | }
20 |
21 | public void setTitle(String title) {
22 | this.title = title;
23 | }
24 |
25 | public String getUrl() {
26 | return url;
27 | }
28 |
29 | public void setUrl(String url) {
30 | this.url = url;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/res/drawable/ic_github.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/res/drawable/ic_link.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/res/drawable/item_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/android-recyclerview/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.2.61'
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.1.4'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/android-recyclerview/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-recyclerview/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android-recyclerview/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Aug 23 09:48:09 GMT+03:00 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/android-recyclerview/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/android-show-image-and-path/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-show-image-and-path/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-show-image-and-path/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/balloon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sign-in-up-screen/res/drawable-hdpi/balloon_bg.png
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/button_default_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
10 |
12 |
13 |
14 |
15 | -
16 |
17 |
21 |
24 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/edittext_bottom_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/edittext_default_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/edittext_top_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sign-in-up-screen/res/drawable-hdpi/email.png
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sign-in-up-screen/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/linearlayout_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sign-in-up-screen/res/drawable-hdpi/password.png
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/drawable-hdpi/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sign-in-up-screen/res/drawable-hdpi/user.png
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sign In&Up
5 | Settings
6 | Hello world!
7 |
8 |
21 |
22 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/src/com/hmkcode/android/sign/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.sign;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.content.Intent;
6 | import android.view.Menu;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.widget.Button;
10 |
11 | public class MainActivity extends Activity implements OnClickListener {
12 |
13 | Button btnSignIn;
14 | Button btnSignUp;
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | setContentView(R.layout.activity_main);
19 |
20 | btnSignIn = (Button) findViewById(R.id.btnSingIn);
21 | btnSignUp = (Button) findViewById(R.id.btnSignUp);
22 |
23 | btnSignIn.setOnClickListener(this);
24 | btnSignUp.setOnClickListener(this);
25 | }
26 | @Override
27 | public void onClick(View v) {
28 | Intent i = null;
29 | switch(v.getId()){
30 | case R.id.btnSingIn:
31 | i = new Intent(this,SignInActivity.class);
32 | break;
33 | case R.id.btnSignUp:
34 | i = new Intent(this,SignUpActivity.class);
35 | break;
36 | }
37 | startActivity(i);
38 | }
39 |
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/src/com/hmkcode/android/sign/SignInActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.sign;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 |
6 | public class SignInActivity extends Activity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_sign_in_screen);
12 | }
13 |
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/android-sign-in-up-screen/src/com/hmkcode/android/sign/SignUpActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.sign;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.view.Menu;
6 |
7 | public class SignUpActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_sign_up_screen);
13 | }
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/android-social-signin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-social-signin/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/balloon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/res/drawable-hdpi/balloon_bg.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/button_fb_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
10 |
12 |
13 |
14 |
15 | -
16 |
17 |
21 |
24 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/button_gplus_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
10 |
12 |
13 |
14 |
15 | -
16 |
17 |
21 |
24 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/button_twitter_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
10 |
12 |
13 |
14 |
15 | -
16 |
17 |
21 |
24 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/icon_fb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/res/drawable-hdpi/icon_fb.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/icon_gplus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/res/drawable-hdpi/icon_gplus.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/icon_twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-social-signin/res/drawable-hdpi/icon_twitter.png
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/layers_fb_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | -
8 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/layers_gplus_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | -
8 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/layers_twitter_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | -
8 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android-social-signin/res/drawable-hdpi/linearlayout_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android-social-signin/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-social-signin/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-social-signin/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Social Network Sign-In
5 | Settings
6 | Hello world!
7 |
8 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android-social-signin/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-social-signin/src/com/hmkcode/android/signin/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.signin;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.view.Menu;
6 |
7 | public class MainActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 | }
14 |
15 | @Override
16 | public boolean onCreateOptionsMenu(Menu menu) {
17 | // Inflate the menu; this adds items to the action bar if it is present.
18 | getMenuInflater().inflate(R.menu.main, menu);
19 | return true;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/android-sqlite/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android-sqlite/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sqlite/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-sqlite/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-sqlite/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-sqlite/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android-sqlite/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-sqlite/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-sqlite/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SQLite
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-sqlite/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-sqlite/src/com/hmkcode/android/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import java.util.List;
4 |
5 | import com.hmkcode.android.model.Book;
6 | import com.hmkcode.android.sqlite.MySQLiteHelper;
7 |
8 | import android.os.Bundle;
9 | import android.app.Activity;
10 |
11 |
12 | public class MainActivity extends Activity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_main);
18 |
19 |
20 | MySQLiteHelper db = new MySQLiteHelper(this);
21 |
22 | /**
23 | * CRUD Operations
24 | * */
25 | // add Books
26 | db.addBook(new Book("Android Application Development Cookbook", "Wei Meng Lee"));
27 | db.addBook(new Book("Android Programming: The Big Nerd Ranch Guide", "Bill Phillips and Brian Hardy"));
28 | db.addBook(new Book("Learn Android App Development", "Wallace Jackson"));
29 |
30 | // get all books
31 | List list = db.getAllBooks();
32 |
33 | // delete one book
34 | db.deleteBook(list.get(0));
35 |
36 | // get all books
37 | db.getAllBooks();
38 |
39 |
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/android-sqlite/src/com/hmkcode/android/model/Book.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android.model;
2 |
3 |
4 |
5 | public class Book {
6 |
7 | private int id;
8 | private String title;
9 | private String author;
10 |
11 | public Book(){}
12 |
13 | public Book(String title, String author) {
14 | super();
15 | this.title = title;
16 | this.author = author;
17 | }
18 |
19 | public int getId() {
20 | return id;
21 | }
22 | public void setId(int id) {
23 | this.id = id;
24 | }
25 | public String getTitle() {
26 | return title;
27 | }
28 | public void setTitle(String title) {
29 | this.title = title;
30 | }
31 | public String getAuthor() {
32 | return author;
33 | }
34 | public void setAuthor(String author) {
35 | this.author = author;
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return "Book [id=" + id + ", title=" + title + ", author=" + author
41 | + "]";
42 | }
43 |
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/android-start-activity/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-start-activity/ic_launcher-web.png
--------------------------------------------------------------------------------
/android-start-activity/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-start-activity/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-start-activity/res/layout/activity_another.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/android-start-activity/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
25 |
26 |
--------------------------------------------------------------------------------
/android-start-activity/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/android-start-activity/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android-start-activity/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | App
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android-start-activity/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-start-activity/src/com/hmkcode/android/AnotherActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 |
6 | public class AnotherActivity extends Activity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | // TODO Auto-generated method stub
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_another);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/android-start-activity/src/com/hmkcode/android/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.android;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.content.Intent;
6 | import android.view.Menu;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.widget.Button;
10 |
11 | public class MainActivity extends Activity implements OnClickListener {
12 |
13 | Button btnStartAnotherActivity;
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_main);
18 |
19 | btnStartAnotherActivity = (Button) findViewById(R.id.btnStartAnotherActivity);
20 |
21 | btnStartAnotherActivity.setOnClickListener(this);
22 | }
23 |
24 |
25 | @Override
26 | public void onClick(View view) {
27 |
28 | Intent inent = new Intent(this, AnotherActivity.class);
29 |
30 | // calling an activity using action name
31 | // Intent inent = new Intent("com.hmkcode.android.ANOTHER_ACTIVITY");
32 |
33 | startActivity(inent);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 27
9 | defaultConfig {
10 | applicationId "com.hmkcode"
11 | minSdkVersion 19
12 | targetSdkVersion 27
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28 | implementation 'com.android.support:appcompat-v7:27.1.1'
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | implementation 'com.android.support:design:27.1.1'
31 | testImplementation 'junit:junit:4.12'
32 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
33 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
34 | }
35 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/java/com/hmkcode/adapters/MyFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.adapters;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 | import com.hmkcode.fragments.FirstFragment;
7 | import com.hmkcode.fragments.SecondFragment;
8 |
9 | public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
10 |
11 |
12 | public MyFragmentPagerAdapter(FragmentManager fm) {
13 | super(fm);
14 | }
15 |
16 | @Override
17 | public Fragment getItem(int position) {
18 | switch (position) {
19 | case 0:
20 | return new FirstFragment();
21 | case 1:
22 | return new SecondFragment();
23 | default:
24 | return null;
25 | }
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return 2;
31 | }
32 | }
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/java/com/hmkcode/fragments/FirstFragment.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import com.hmkcode.R;
9 |
10 | public class FirstFragment extends Fragment {
11 |
12 | public FirstFragment() {}
13 |
14 | @Override
15 | public void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | }
18 |
19 | @Override
20 | public View onCreateView(LayoutInflater inflater,
21 | ViewGroup container,
22 | Bundle savedInstanceState) {
23 | return inflater.inflate(R.layout.fragment_first, container, false);
24 | }
25 | }
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/java/com/hmkcode/fragments/SecondFragment.java:
--------------------------------------------------------------------------------
1 | package com.hmkcode.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import com.hmkcode.R;
9 |
10 | public class SecondFragment extends Fragment {
11 |
12 | public SecondFragment() {}
13 |
14 | @Override
15 | public void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | }
18 |
19 | @Override
20 | public View onCreateView(LayoutInflater inflater,
21 | ViewGroup container,
22 | Bundle savedInstanceState) {
23 | return inflater.inflate(R.layout.fragment_second, container, false);
24 | }
25 | }
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
22 |
23 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/res/layout/fragment_first.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/app/src/main/res/layout/fragment_second.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android-swipe-views-tabs/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.2.61'
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.1.4'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/balloon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-whatsapp-profile-screen/res/drawable-hdpi/balloon.png
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/edit_states.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-whatsapp-profile-screen/res/drawable-hdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/ic_action_new_event.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-whatsapp-profile-screen/res/drawable-hdpi/ic_action_new_event.png
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hmkcode/Android/a301aa4b1b6b684978f15e7528507ac350aea3f2/android-whatsapp-profile-screen/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/image_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/image_state.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
10 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android-whatsapp-profile-screen/res/drawable-hdpi/textview_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
19 |
20 |
21 |
22 |
23 |
24 | -
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/intent-action-send/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | android {
5 | compileSdkVersion 29
6 | buildToolsVersion "29.0.2"
7 |
8 |
9 | defaultConfig {
10 | applicationId "com.hmkcode.intent_action_send"
11 | minSdkVersion 19
12 | targetSdkVersion 29
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
31 | implementation 'androidx.appcompat:appcompat:1.0.2'
32 | implementation 'androidx.core:core-ktx:1.0.2'
33 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
34 | testImplementation 'junit:junit:4.12'
35 | androidTestImplementation 'androidx.test.ext:junit:1.1.0'
36 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
37 | }
38 |
--------------------------------------------------------------------------------
/intent-action-send/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/intent-action-send/src/main/java/com/hmkcode/intent_action_send/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.hmkcode.intent_action_send
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import android.widget.Button
7 | import android.widget.TextView
8 |
9 | class MainActivity : AppCompatActivity() {
10 |
11 | private lateinit var textView: TextView
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_main)
16 |
17 | val button = findViewById