Develop Bulletin sdk#1
Conversation
| @@ -0,0 +1,69 @@ | |||
| plugins { | |||
| id 'com.android.application' | |||
There was a problem hiding this comment.
This should not be an application. This needs to be configured as a library.
Refer to https://github.com/Codigami/CFAlertDialog/blob/master/cfalertdialog/build.gradle
| kapt 'com.github.bumptech.glide:compiler:4.13.2' | ||
|
|
||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
New line. Add this to all the new files.
| </activity> | ||
| </application> | ||
|
|
||
| </manifest> No newline at end of file |
| gsonInstance = GsonHelper.gsonInstance | ||
| } | ||
|
|
||
| } No newline at end of file |
| import com.bulletin.utilities.GsonHelper | ||
| import com.google.gson.Gson | ||
|
|
||
| class BulletinApp : Application() { |
There was a problem hiding this comment.
Application class is not required for this.
Wherever context is required it needs to be passed in as parameter.
There was a problem hiding this comment.
I have same thinking but we need to discuss.
| android:theme="@style/Theme.Bulletin" | ||
| tools:targetApi="31"> | ||
| <activity | ||
| android:name=".MainActivity" |
There was a problem hiding this comment.
Rename this activity.
Do not use Launcher category. Should be a default activity.
There was a problem hiding this comment.
Then how we can run the project?
| return true | ||
| } | ||
|
|
||
| } No newline at end of file |
| import com.bulletin.utilities.VersionUtil | ||
| import java.util.* | ||
|
|
||
| //object BulletinDataStore { |
| import com.example.bulletin.databinding.ActivityMainBinding | ||
| import com.wrx.wazirx.views.bulletin.model.Media | ||
|
|
||
| class MainActivity : AppCompatActivity(), FormRecyclerViewAdapter.OnItemClickListener { |
| binding = ActivityMainBinding.inflate(layoutInflater) | ||
| setContentView(binding.root) | ||
|
|
||
| binding.listView.setBackgroundColor(ThemeUtils.getAttributedColor(R.attr.main_bg_surface_alt, binding.listView.context)) |
There was a problem hiding this comment.
We are using our colors in this library..?
We should be configuring this from the main app right..?
| } | ||
|
|
||
| fun setUpItems() : ArrayList<BulletinItem> { | ||
| // val bulletinItem = PreTitle("text") |
|
|
||
| fun updateAppearance() { | ||
|
|
||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { |
There was a problem hiding this comment.
Extract this condition into an extension.
| // val items = BulletinSdk().showUnseenBulletin(4) | ||
|
|
||
|
|
||
| val title = Title("Version " + "1.21","In this update","loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum") |
| } | ||
|
|
||
| fun Any.saveToStorage(key: Any) { | ||
| // AppStorageHelper.save(key, this) |
| package com.bulletin.extension | ||
|
|
||
|
|
||
| fun String.isNumeric(): Boolean { |
There was a problem hiding this comment.
These methods can be combined with StringExtensions.kt
| @@ -0,0 +1,79 @@ | |||
| package com.bulletin.models | |||
|
|
|||
| data class BulletPoint(var bullet: Bullet?, var titleText: String?, var subTitleText: String?) : BulletinItem() { | |||
No description provided.