Skip to content

Commit

Permalink
remove setting fab,fix null point bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Dec 6, 2019
1 parent 52dce45 commit 9c5578c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ class SearchRActivityFragment : Fragment() {
recyclerview.adapter = tagsTextAdapter
tagsTextAdapter.setOnItemClickListener { adapter, view, position ->
val s_tag = tags[position]
if (s_tag.translated_name.isNotEmpty())
if (s_tag.translated_name != null && s_tag.translated_name.isNotEmpty())
tagsTextViewModel.addhistory(s_tag.name + "|" + s_tag.translated_name)
else tagsTextViewModel.addhistory(s_tag.name)
val bundle = Bundle()
bundle.putString("searchword", tags[position].name)
val intent = Intent(activity!!, SearchResultActivity::class.java)
val intent = Intent(requireActivity(), SearchResultActivity::class.java)
intent.putExtras(bundle)
startActivityForResult(intent, 775)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import android.view.MenuItem
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import androidx.viewpager2.widget.ViewPager2
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.tabs.TabLayout
import com.perol.asdpl.pixivez.R
import com.perol.asdpl.pixivez.fragments.AboutXFragment
Expand All @@ -56,10 +55,6 @@ class SettingActivity : RinkActivity() {
setContentView(R.layout.activity_setting)
setSupportActionBar(toolbar)
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
fab.setOnClickListener { view ->
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show()
}
tablayout_setting.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabReselected(tab: TabLayout.Tab?) {

Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,5 @@

<include layout="@layout/content_setting" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit 9c5578c

Please sign in to comment.