Skip to content

Commit

Permalink
Meow Bottom Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
selimdawa committed Feb 13, 2023
1 parent 42496ab commit a20be86
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
10 changes: 6 additions & 4 deletions Little Books/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "com.flatcode.littlebooks"
minSdk 23
targetSdk 33
versionCode 4
versionName "1.25"
versionCode 5
versionName "1.30"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -50,6 +50,7 @@ android {

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0"
implementation 'androidx.core:core-ktx:1.9.0' //Kotlin Core
implementation 'androidx.appcompat:appcompat:1.6.1' //Appcompat for class
implementation 'androidx.preference:preference-ktx:1.2.0' //Shared preference
Expand All @@ -69,8 +70,9 @@ dependencies {
implementation 'com.google.firebase:firebase-analytics-ktx' //Firebase Analytics
//implementation 'com.google.firebase:firebase-crashlytics-ktx' //Firebase Crashlytics
//Ads
implementation 'com.google.android.gms:play-services-ads:21.3.0' //ADs Google AdMob
implementation 'com.google.android.gms:play-services-ads:21.5.0' //ADs Google AdMob
//Pdf
//noinspection GradleDependency
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2' //Pdf view
//Image
implementation 'de.hdodenhof:circleimageview:3.1.0' //Circle image
Expand All @@ -81,5 +83,5 @@ dependencies {
implementation 'com.github.smarteist:autoimageslider:1.3.2' //Slider Show
implementation 'jp.wasabeef:glide-transformations:4.3.0' //Image Blur
//Bottom Navigation
implementation 'com.etebarian:meow-bottom-navigation:1.3.1' //Meow Bottom Navigation
implementation 'com.etebarian:meow-bottom-navigation-java:1.2.0' //Meow Bottom Navigation
}
2 changes: 1 addition & 1 deletion Little Books/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
Expand Down
3 changes: 2 additions & 1 deletion Little Books/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:theme="@style/OneTheme"
android:usesCleartextTraffic="true"
tools:replace="android:supportsRtl"
tools:targetApi="33">
tools:targetApi="31">
<activity
android:name=".Activity.SplashActivity"
android:exported="true">
Expand Down Expand Up @@ -56,6 +56,7 @@
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/admob_id" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
import com.etebarian.meowbottomnavigation.MeowBottomNavigation
import com.flatcode.littlebooks.Fragment.CategoriesFragment
import com.flatcode.littlebooks.Fragment.FollowersFragment
import com.flatcode.littlebooks.Fragment.HomeFragment
Expand All @@ -23,12 +24,10 @@ import com.flatcode.littlebooks.Unit.THEME
import com.flatcode.littlebooks.Unit.VOID
import com.flatcode.littlebooks.databinding.ActivityMainBinding
import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.initialization.InitializationStatus
import com.google.firebase.database.DataSnapshot
import com.google.firebase.database.DatabaseError
import com.google.firebase.database.FirebaseDatabase
import com.google.firebase.database.ValueEventListener
import meow.bottomnavigation.MeowBottomNavigation
import java.util.*

class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
Expand Down Expand Up @@ -60,6 +59,7 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
} else if (sharedPreferences.getString(DATA.COLOR_OPTION, "NIGHT_ONE") == "NIGHT_ONE") {
binding!!.toolbar.mode.setBackgroundResource(R.drawable.moon)
}

meowBottomNavigation = binding!!.bottomNavigation
meowBottomNavigation!!.add(MeowBottomNavigation.Model(1, R.drawable.ic_settings))
meowBottomNavigation!!.add(MeowBottomNavigation.Model(2, R.drawable.ic_home))
Expand Down Expand Up @@ -120,8 +120,9 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
.show()
}
}
MobileAds.initialize(applicationContext) { initializationStatus: InitializationStatus? -> }
binding!!.toolbar.image.setOnClickListener { v: View? ->

MobileAds.initialize(applicationContext) { }
binding!!.toolbar.image.setOnClickListener {
VOID.IntentExtra(
context,
CLASS.PROFILE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import android.text.format.DateFormat
import java.util.*

class MyApplication : Application() {

override fun onCreate() {
super.onCreate()
}

companion object {
fun formatTimestamp(timestamp: Long): String {
val calendar =
Calendar.getInstance(Locale.ENGLISH)
val calendar = Calendar.getInstance(Locale.ENGLISH)
calendar.timeInMillis = timestamp
return DateFormat.format("dd/MM/yyyy", calendar).toString()
}
Expand Down
16 changes: 9 additions & 7 deletions Little Books/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@
android:layout_height="0dp"
android:layout_weight="1" />

<meow.bottomnavigation.MeowBottomNavigation
<com.etebarian.meowbottomnavigation.MeowBottomNavigation
android:id="@+id/bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorOnBackground"
app:mbn_backgroundBottomColor="?trackColor"
app:mbn_circleColor="@color/white"
app:mbn_defaultIconColor="@color/white"
app:mbn_selectedIconColor="?trackColor"
app:mbn_shadowColor="?colorOnBackground" />
app:mbn_circleColor="#ffffff"
app:mbn_backgroundBottomColor="#ffffff"
app:mbn_countBackgroundColor="#ff6f00"
app:mbn_countTextColor="#ffffff"
app:mbn_defaultIconColor="#90a4ae"
app:mbn_rippleColor="#2f424242"
app:mbn_selectedIconColor="#3c415e"
app:mbn_shadowColor="#1f212121" />

</LinearLayout>

Expand Down
6 changes: 3 additions & 3 deletions Little Books/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
google()
mavenCentral()
jcenter()
maven { url 'https://maven.google.com' }
//maven { url 'https://maven.google.com' }
}
}
dependencyResolutionManagement {
Expand All @@ -13,8 +13,8 @@ dependencyResolutionManagement {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
//maven { url "https://jitpack.io" }
//maven { url 'https://maven.google.com' }
}
}

Expand Down

0 comments on commit a20be86

Please sign in to comment.