Skip to content

Commit

Permalink
trial
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebraryilmaz committed Jan 3, 2021
1 parent 1b9bfea commit 05d8889
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'

android {
compileSdkVersion 30
Expand All @@ -8,8 +9,8 @@ android {
applicationId "com.ourapps.mynote.huawei"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -33,6 +34,10 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

implementation 'com.huawei.agconnect:agconnect-core:1.3.1.300'
implementation 'com.huawei.hms:ads-lite:13.4.37.300'


//room for database
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.huawei.hms.ads.AdParam;
import com.huawei.hms.ads.banner.BannerView;
import com.ourapps.mynote.huawei.R;
import com.ourapps.mynote.huawei.adapters.NotesAdapter;
import com.ourapps.mynote.huawei.database.NotesDatabase;
Expand Down Expand Up @@ -71,6 +74,12 @@ public void onClick(View v) {
}
});


BannerView bannerView = findViewById(R.id.hw_banner_view);
AdParam adParam = new AdParam.Builder().build();
bannerView.loadAd(adParam);


notesRecyclerView = findViewById(R.id.notesRecyclerView);
notesRecyclerView.setLayoutManager(
new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL)
Expand Down Expand Up @@ -112,6 +121,8 @@ public void onClick(View v) {
}
});



findViewById(R.id.imageAddImage).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:hwads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
Expand Down Expand Up @@ -40,6 +41,14 @@
android:contentDescription="@string/app_name"
android:src="@drawable/ic_search"
app:tint="@color/colorSearchIcon"/>
<com.huawei.hms.ads.banner.BannerView
android:id="@+id/hw_banner_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
hwads:adId="testw6vs28auh3"
hwads:bannerSize="BANNER_SIZE_360_57"/>

<EditText
android:id="@+id/inputSearch"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
repositories {
google()
jcenter()
maven { url 'http://developer.huawei.com/repo/' }
maven {url 'http://developer.huawei.com/repo/'}
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
Expand All @@ -18,7 +18,7 @@ allprojects {
repositories {
google()
jcenter()
maven {url 'http://developer.huawei.com/repo/'}
maven { url 'http://developer.huawei.com/repo/' }
}
}

Expand Down

0 comments on commit 05d8889

Please sign in to comment.