-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop Bulletin sdk #1
base: develop
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,69 @@ | |||
plugins { | |||
id 'com.android.application' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
app/build.gradle
Outdated
kapt 'com.github.bumptech.glide:compiler:4.13.2' | ||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line. Add this to all the new files.
app/src/main/AndroidManifest.xml
Outdated
</activity> | ||
</application> | ||
|
||
</manifest> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line
gsonInstance = GsonHelper.gsonInstance | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line
import com.bulletin.utilities.GsonHelper | ||
import com.google.gson.Gson | ||
|
||
class BulletinApp : Application() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have same thinking but we need to discuss.
app/src/main/AndroidManifest.xml
Outdated
android:theme="@style/Theme.Bulletin" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".MainActivity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this activity.
Do not use Launcher category. Should be a default activity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how we can run the project?
return true | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line
import com.bulletin.utilities.VersionUtil | ||
import java.util.* | ||
|
||
//object BulletinDataStore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code.
import com.example.bulletin.databinding.ActivityMainBinding | ||
import com.wrx.wazirx.views.bulletin.model.Media | ||
|
||
class MainActivity : AppCompatActivity(), FormRecyclerViewAdapter.OnItemClickListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this activity to a better name
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
|
||
fun updateAppearance() { | ||
|
||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the hardcoded data.
} | ||
|
||
fun Any.saveToStorage(key: Any) { | ||
// AppStorageHelper.save(key, this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method required..?
package com.bulletin.extension | ||
|
||
|
||
fun String.isNumeric(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods can be combined with StringExtensions.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will discuss
@@ -0,0 +1,79 @@ | |||
package com.bulletin.models | |||
|
|||
data class BulletPoint(var bullet: Bullet?, var titleText: String?, var subTitleText: String?) : BulletinItem() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to discuss this implementation.
No description provided.